Hi All:
Applyed the under timeslot :
causes some peripherals(eg:static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(2)) no access interrupt,
what 's the matter?
Hi All:
Applyed the under timeslot :
causes some peripherals(eg:static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(2)) no access interrupt,
what 's the matter?
Hi,
What do you mean by "no access interrupt" ? Please elaborate
Hi:
But called the above timeslot ,timer cannot enter callback properly.There's no print on it.
1) Are you doing anything with TIMER2 in radio_callback() ?
2) Does it start to print again when you exit radio_callback()/ the timeslot ?
3) Any difference in behavior if you set NRF_LOG_DEFERRED to 0 in sdk_config.h ?
Hi:
1, radio_callback() unused TIMER2,It is not only TIMER2 cannot enter callback, And PPI doesn't start.
the follow code snippet:
2. Yes! when exit radio_callback(),It can start to print.
3.Try to set NRF_LOG_DEFERRED to 0 in sdk_config.h, The result is the same. Has nothing to do with it.
2. Yes! when exit radio_callback(),It can start to print.
While you are inside the radio_callback() / signal handler, you won't be able to process any interrupt before you exit the signal handler, since the signal handler runs at the highest priority. See this link
Hi:
I try to the timer interrupt to 0(highest),It is not only TIMER2 cannot enter callback. the follow set:
I have read the link you sent, But I still don't know how to correct it now .
Can you give me some advice.
zxcv7063 said:But I still don't know how to correct it now .
It's not possible.
You need to exit the signal handler, and then you can enter the TIMER2 callback.
From the link:
"The signal handler may be called several times during a timeslot. It is recommended to use the signal handler only for real time signal handling. When the application has handled the signal, it can exit the signal handler and wait for the next signal if it wants to do other (less time critical) processing at lower interrupt priority (higher numerical value for the priority level) while waiting."
zxcv7063 said:But I still don't know how to correct it now .
It's not possible.
You need to exit the signal handler, and then you can enter the TIMER2 callback.
From the link:
"The signal handler may be called several times during a timeslot. It is recommended to use the signal handler only for real time signal handling. When the application has handled the signal, it can exit the signal handler and wait for the next signal if it wants to do other (less time critical) processing at lower interrupt priority (higher numerical value for the priority level) while waiting."
Hi:
Can you give me a second look? thanks!
I took at quick look at the code. TIMER2 is used for ESB(NRF_ESB_SYS_TIMER), and it seems to have priority 6.
When you get the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START, you trigger TIMESLOT_BEGIN_IRQn/TIMESLOT_BEGIN_IRQHandler. This is running at priority 1. This means that you will not get any interrupt from TIMER2 while you are inside TIMESLOT_BEGIN_IRQHandler.