#RaspberryPi 0: PWM hard-coded bare metal audio working

I’ve been experimenting with PWM on the RaspberryPi again. I managed to get a hard-coded sample working, which you can view here.

This is pretty cool, because my rough-around-the-edges bare-metal “unikernel”, Crunky, is showing its usefulness to me. Porting the BCM2835 library has been a great help.

I’m inching closer to getting a real-time synth going.

I’ve got the SD card “working”, too, so it is at least conceivable that I’ll be able to save and load my work. Currently SD works only as a block reading and writing device. FAT filesystem support does not exist. I’m thinking it’s too complicated for me to implement, too. I’m thinking of, maybe, implementing my own filesystem. Something simple.

Also, maybe, just maybe, I’ll be able to crib some code from the Cambridge University site and get a USB keyboard working. That would be so cool!

USB is a nightmare on the Pi, and it’s really difficult to know how to approach it. I’ve not had much success with it. Maybe tinyusb might be something in the way of a solution.

In fact, USB is kinda what lets the Pi down. It’s complicated, and not something I relish tackling.

I’m in two minds at the moment as to the best hardware with which to approach real-time systems. Should it be the Pi0 or the Pico? I’m edging in favour of the Pi0.

About mcturra2000

Computer programmer living in Scotland.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s