Why only 32 instructions in the PIO peripherals

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Why only 32 instructions in the PIO peripherals

Post by /RaspberryPi »

They don't mention it much, but you only get 32 instructions of space shared between each of the 2 blocks of 4 pio state machines.
So you can write a program that is a max of 32 instructions long for a state machine, and no longer. And if you want more than 2 state machines with such a long but different programs, you can't do that. The 4 state machines in each batch share memory.
Is memory not dirt cheap these days? I was just wanting to make a low rpm (~200 RPM) brushless motor controller, and if I could put more instructions into the pio modules, they could make me the PWM waveform that goes to the transistors to end up a sine wave approximation. But you can't do math of course in the pio things, so as far as I can tell it's basically impossible, I could feed the PWM levels into the state machine using the buffer I guess, and it could do the timing. That helps slightly.
Basically I just want to bring this bizarre and unfortunate limitation up so hopefully they will improve it in the next revision.

submitted by /u/Able_Loan4467
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”