LPC55S16 1uS Interval Timer is not working

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

LPC55S16 1uS Interval Timer is not working

1,065 Views
SateeshMaragani
Contributor I

Hi

I am using LPC5516 in our project, we observed one issue with timers (Any timer unit in LPC5516) in  during our development, none of the timers are executing interrupt for 1uS. There is always latency issue which is more that 5us. 

After modifying many settings we are able to come down to 2.5uS for 1uS timer. Which is not making any sense to us. 

This is cortex-m33+ device & having SDK available, when we are trying the same also the issue not resolved. 

 

Anyone can help us to resolve this issue.

 

 

Labels (1)
0 Kudos
3 Replies

1,057 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Sateesh,

 

Regarding your question of interrupt latency, when the interrupt is triggered, the CM33 core has to save 12 core registers to core, then jump to ISR, when it exits from the ISR, it has to pop 12 core registers to core, then jump to the original line, it takes along time. From our test, the maximum ISR execution frequency is  about 1MHz for LPC55xx I suppose. In order to achieve the result, the ISR should contain as less code as possible to shorten the ISR execution time.

This is an application note which talks about the latency of ISR based on Cortex-M7

https://www.nxp.com.cn/docs/en/application-note/AN12078.pdf

Hope it can help you

BR

XiangJun Rong

 

 

 

0 Kudos

1,048 Views
SateeshMaragani
Contributor I

hi XiangJun 

Thanks for your reply, I am using LPC%%16 at 150Mhz as CPU clock frequency. As per below calculation interrupt latency is of 15 CPU clock cycles (100nS approximately). Where as in my case when i am running interval timer for 1uS the GPIO toggle execution is at 5uS.

0 Kudos

1,025 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

If you do want to toggle a GPIO pin as fast as possible, I suppose you can locate the ISR in SRAMX space, furthermore, write assembly code to toggle the GPIO pin.

Hope it can help you

BR

XiangJun Rong

 

0 Kudos