Interrupt time delay (spi-dma; kl26)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupt time delay (spi-dma; kl26)

977 Views
valeremar
Contributor I

Dear All,

 

I have a KL26 whose core clock is set-up at 48MHz. I have set-up a SPI-DMA transfer similar to the example of KSDK 1.3.0. The data transfer is started by an external signal on a GPIO (PTC9) signal edge (interrupt). It works! I have measured on an oscilloscope a delay of approx. 10 microseconds between the edge of the GPIO signal and the start of the SPI transfer …

 

The interrupt function is very simple (for test purpose) …
 

void getdata_PORTC_IRQHandler(void)

{

DMA_DCR1|=0x40000000u; //start DMA1 transfer

DMA_DCR0|=0x40000000u; //start DMA0 transfer

PORT_HAL_ClearPortIntFlag(PORTC_BASE_PTR);

 

}

 

In the main program loop, I use polling to set-up the spi BCR bits again and clear the done bit after each transfer.

 

My question is: can it be faster? If yes, how can I make the delay between signal edge and the start of SPI-DMA transfer shorter? How short?

 

I read somewhere about 10-12 clock cycles (for interrupt alone) … that would be approx. 0.2 microsecond right. So where do the 10 microseconds come from?

 

Thank you for you inputs.

Val

Labels (1)
0 Kudos
Reply
1 Reply

831 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suspect that the interrupt delay is greater than 0.2uS, you can toggle a GPIO pin in the void getdata_PORTC_IRQHandler(void) function to test the interrupt delay.

BR

Xiangjun Rong

0 Kudos
Reply