cancel
Showing results for 
Search instead for 
Did you mean: 

accuracy of EXTI

developer2
Senior
Posted on November 12, 2013 at 23:59

Hi all, 

i'm using STM32F417 at 168MHz, and i would like to synchronize ''while'' cycle with totally 4 instructions with 6 time cycles (for example: ldr ldr tst bne) with 28MHz signal on PF8, 

so i configured EXTI with IRQ on NVIC with no other IRQs in use, 

i configured EXTI_Line8 to raise interrupt on Rising edge, but it seems that IRQ is raised asynchronously :( 

once i'm getting array with 1s and other time i'm geeting zeroes, it's not always zeroes or ones, 

is there some hidden delay in EXTI irq ? 

Kind regards, 

2 REPLIES 2
Posted on November 13, 2013 at 00:12

Well your not going to be able to interrupt at 28 MHz.

The input is resynchronized, and shifted to detect edges, there is some latency there, and it takes of the order of 12 cycles to push the processor context on entry. The ART adds some variability to instruct fetches, RAM can be slower but is more predictable.

Toggling a GPIO pin, and reading back others could be done at quite a high rate, I wouldn't attempt to tune a loop and hope I could do a bunch of asynchronous reads reliably.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
developer2
Senior
Posted on November 13, 2013 at 10:03

well , synchronizing is only first step, because i will use A/D converter THS0842 that is generating clock for sampling data, so i wanted to synchronize to clk and after it i wanted to start sampling converted data into buffer and it should be also in 6 time cycles (4 instructions)