This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Performance analysis on nrf5340

Hi,

Is there any way we can measure performance on nrf5340?

We have an IRQ event handler for ISR and we see that whenever the event handler is invoked, main function slows down resulting in timing issues.

Adding logs with timestamp to check this slowing is only worsening the slippage.  

Is there any way we can verify is the measure if main() is getting enough CPU when ISR is being addressed?

Also, any help towards how to address slowing down in such scenarios is appreciated. We tried increasing main thread's priority to maximum(-15). This did not help.

Regards,

Divya

Parents
  • Hi Divya,

    We have an IRQ event handler for ISR and we see that whenever the event handler is invoked, main function slows down resulting in timing issues.

    That will always be the case.

    Is there any way we can verify is the measure if main() is getting enough CPU when ISR is being addressed?

    Your main() will not get any CPU time during this time. Any interrupt with a priority higher than what is running will cause the running code to be preempted (effectively paused) until the higher priority interrupt is serviced.

    Also, any help towards how to address slowing down in such scenarios is appreciated. We tried increasing main thread's priority to maximum(-15). This did not help

    If you want to do performance measurements without being interrupted you have to either run the measurement in the highest interrupt priority, or simply ensure that you do not have any other interrupt sources enabled.

Reply
  • Hi Divya,

    We have an IRQ event handler for ISR and we see that whenever the event handler is invoked, main function slows down resulting in timing issues.

    That will always be the case.

    Is there any way we can verify is the measure if main() is getting enough CPU when ISR is being addressed?

    Your main() will not get any CPU time during this time. Any interrupt with a priority higher than what is running will cause the running code to be preempted (effectively paused) until the higher priority interrupt is serviced.

    Also, any help towards how to address slowing down in such scenarios is appreciated. We tried increasing main thread's priority to maximum(-15). This did not help

    If you want to do performance measurements without being interrupted you have to either run the measurement in the highest interrupt priority, or simply ensure that you do not have any other interrupt sources enabled.

Children
No Data
Related