Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4475

General • Is it possible to route a timer interrupt to PIO?

$
0
0
Rationale: I want to generate a 2MHz bitstream. I need to quite a lot of PIO work between each bit, and the amount of work varies.

What I'm currently doing is running the PIO at full speed, and have one program which just counts and sets a PIO interrupt at regular intervals. The other program, the one which creates the bitstream, is doing `wait 1 irq 0; out pins, 1` to actually produce the bits. This forces it to emit each bit precisely at the right time. I now no longer have to care about the timing between bits (provided I don't overrun, of course).

Except, using a PIO program for this is kinda ick. I'd prefer to use a timer interrupt --- they're easier to set up, for a start. But, I'm not sure whether the interrupt controller is capable of routing interrupts to the PIO unit.

Can this be done (and if so, how)?

Statistics: Posted by david.given — Sun May 19, 2024 3:32 pm — Replies 1 — Views 45



Viewing all articles
Browse latest Browse all 4475

Trending Articles