This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Migration to SD functions

I have to update my non soft device source code to SD because now I will use Radio.

My question is if it is necessary to rewrite all functions which are in SD API. Like:

NVIC_SetPriority(ADC_IRQn, APP_IRQ_PRIORITY_LOW);
NVIC_ClearPendingIRQ(ADC_IRQn);
NVIC_EnableIRQ(ADC_IRQn);
NRF_POWER->SYSTEMOFF = 1;	
NRF_CLOCK->TASKS_HFCLKSTART = 1;
NRF_RTC1->EVENTS_COMPARE[0] = 0;
__WFI();
__WFE();
and similiar

I'm assume that SD alternate function has just some assert to control if I'm passing right arguments or so. So if I'm sure I didn't use any resources against SD, is it necessary to use strictly only SD functions?

Parents
  • You can see in S110_SoftDevice_Specification_v1 3.pdf there is a list of peripherals used by softdevice in "Table 23 Peripheral protection and usage by SoftDevice".

    Any direct access to the protected resources while softdevice is enabled will generate hard fault by softdevice, so you must use softdevice calls to access to this resources.

  • I'm not using any peripheral used by SD, but I'm using IRQ handlers for non restrictred or blocked peripherals (I hope at least this is OK), various power modes and HF clock start/stop (so here I have to use alternate SD funcs). BTW sd_app_evt_wait() is waiting for event or irq, what about if I want strictly wait for irq as it is done by __WFI()?

Reply
  • I'm not using any peripheral used by SD, but I'm using IRQ handlers for non restrictred or blocked peripherals (I hope at least this is OK), various power modes and HF clock start/stop (so here I have to use alternate SD funcs). BTW sd_app_evt_wait() is waiting for event or irq, what about if I want strictly wait for irq as it is done by __WFI()?

Children
No Data
Related