As title
Situration:
1. Timer00
2. every 4us interrupt occur
result:
1. Enter Timer interrupt cost 700ns
2. Leave Timer interrupt cost 200ns
3. Totol cost: 1.04us
How to reduce inrerrupt cost from 1.04us to around 200ns?
Austin
As title
Situration:
1. Timer00
2. every 4us interrupt occur
result:
1. Enter Timer interrupt cost 700ns
2. Leave Timer interrupt cost 200ns
3. Totol cost: 1.04us
How to reduce inrerrupt cost from 1.04us to around 200ns?
Austin
This is a continuation of this thread here: https://devzone.nordicsemi.com/f/nordic-q-a/128563/nrf54l15-sb_config_bootloader_mcuboot-y-makes-main-gpio-toggle-stop.
How to reduce inrerrupt cost from 1.04us to around 200ns?
To reduce the overhead you can define your ISR as "direct" with no rescheduling on return: https://nrfconnectdocs.nordicsemi.com/ncs/latest/zephyr/kernel/services/interrupts.html#defining-a-direct-isr. Building with CONFIG_SPEED_OPTIMIZATIONS=y may also help shave off a few CPU cycles. But what I was trying to ask in the previous thread is whether you really need the timer interrupt to preempt your code. Given the short interval, it may make more sense to poll the TIMER counter register instead.
This is a continuation of this thread here: https://devzone.nordicsemi.com/f/nordic-q-a/128563/nrf54l15-sb_config_bootloader_mcuboot-y-makes-main-gpio-toggle-stop.
How to reduce inrerrupt cost from 1.04us to around 200ns?
To reduce the overhead you can define your ISR as "direct" with no rescheduling on return: https://nrfconnectdocs.nordicsemi.com/ncs/latest/zephyr/kernel/services/interrupts.html#defining-a-direct-isr. Building with CONFIG_SPEED_OPTIMIZATIONS=y may also help shave off a few CPU cycles. But what I was trying to ask in the previous thread is whether you really need the timer interrupt to preempt your code. Given the short interval, it may make more sense to poll the TIMER counter register instead.
Hi Vidar
Yes, I really need the timer interrupt to preempt my code.
It is a real-time application. Because that, I have some calculate and response immidiatly.
I will try this " direct ISA". After I testing it , I will let you know the result.
Austin