I'm using imxrt1060-EVKB and MCUXpresso (v11.7.0) along with SDK (v2.13.0).
FLEXIO2 is configured to shift 4-bit values and provides the expected output (The 4-bit values show up at the assigned pins with a clock on a fifth pin.).
I'd like to get an interrupt when the shifting has completed. I can see a DMA interrupt when the DMA finishes fetching data in the major loop, but that is before the shifter has completed shifting the data out.
The only shifter interrupt I can see is when a clock edge is seen, but to know when the shifter has completed, these would have to be counted (which seems like a lot of overhead!).
I read a posting that suggested using another timer, so I configured one to set when the shifter enabled and reset when the shifter was disabled, producing the signal shown in the diagram. But the only way to create an interrupt seems to be to route the pin out and back (through the xbar?) to an interrupt source. I didn't see a way to do this internally (within the FLEXIO module).
Is there an easier way to do this?
Thanks!
I tried using a second timer (Timer1) to count-down the edges, hoping to produce an interrupt when Timer1 gets to zero.
However, I didn't get an interrupt and introduced a side-effect I don't understand!
Image "FlexIO_interrupt_Timer1Disabled" shows the activity coming from FLEXIO2. This is the output I expect. The configuration of Timer0 (which drives the shift clock) is shown in image "FlexIO_interrupt_Timer0Config". (I'm parallel shifting 4-bit items using Timer0 as the shift clock.)
Image "FlexIO_interrupt_Timer1Config" shows the configuration for Timer1. My intent is to count down the shifts (edges) from Timer0, expecting an interrupt when the count gets down to 0. I added an output pin to monitor what is happening.
Image "FlexIO_interrupt_Timer1Enabled" shows the results. The trace labeled FlexIO_TIM1 shows the low-going pulse when the counter should reach zero, but no interrupt is detected. But I also see some additional clocks from Timer0 (and associated shifting on the shifter outputs)!
I've read every app note, posting, manual I can find trying to understand how this peripheral works, but clearly I don't understand what is happening...
Suggestions???
Thanks!