Hi ,
If the softdevice had inited (called sd_ble_enable() ) , Can I use the NVIC_EnableIRQ (or NVIC_DisableIRQ )
to enable/disable an interrupt ?
What is the difference between the sd_nvic_EnableIRQ and NVIC_EnableIRQ ?
Thanks a lot !
Hi ,
If the softdevice had inited (called sd_ble_enable() ) , Can I use the NVIC_EnableIRQ (or NVIC_DisableIRQ )
to enable/disable an interrupt ?
What is the difference between the sd_nvic_EnableIRQ and NVIC_EnableIRQ ?
Thanks a lot !
Hi.
If you have the SoftDevice enabled, you cannot use the NVIC_EnableIRQ or NVIC_DisableIRQ API, this is because it is restricted when the SoftDevice is enabled, as you can read here.
You then have to use the SoftDevice API for NVIC.
sd_nvic_DisableIRQ() and sd_nvic_EnableIRQ(), they corresponds to NVIC_DisableIRQ and NVIC_EnableIRQ in CMSIS.
- Andreas
Hi.
If you have the SoftDevice enabled, you cannot use the NVIC_EnableIRQ or NVIC_DisableIRQ API, this is because it is restricted when the SoftDevice is enabled, as you can read here.
You then have to use the SoftDevice API for NVIC.
sd_nvic_DisableIRQ() and sd_nvic_EnableIRQ(), they corresponds to NVIC_DisableIRQ and NVIC_EnableIRQ in CMSIS.
- Andreas
Thanks your reply ! Then I can use like this :
// power on
NVIC_DisableIRQ(TIMER1_IRQn) ;
sd_ble_enable(&ble_enable_params);
....
NVIC_EnableIRQ(TIMER1_IRQn);
.......
// softdevice is enabled , do somthing
sd_nvic_DisableIRQ(TIMER1_IRQn) ;
myfunc1() ;
sd_nvic_EnableIRQ(TIMER1_IRQn);
.....
Hi.
redfish said:
// power on
NVIC_DisableIRQ(TIMER1_IRQn) ;
sd_ble_enable(&ble_enable_params);
....
NVIC_EnableIRQ(TIMER1_IRQn);
.......
// softdevice is enabled , do somthing
sd_nvic_DisableIRQ(TIMER1_IRQn) ;
myfunc1() ;
sd_nvic_EnableIRQ(TIMER1_IRQn);
You cant use NVIC_EnableIRQ(TIMER1_IRQn); after you have used sd_ble_enable(&ble_enable_params); (since you have enabled the SoftDevice here), you have to use the sd_nvic_EnableIRQ(TIMER1_IRQn); API after you enabled the SoftDevice.
- Andreas
OK , Thank you !