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

consistent support in sd_* wrapper functions

The documentation for S110 v7.1.0 sd_nvic_ClearPendingIRQ implies that it works with any valid IRQ.

I find that (using S110 v7.1.0 with SDK 7.1.0):

  sd_nvic_ClearPendingIRQ(UART0_IRQn);

generates a hard fault while

  NVIC_ClearPendingIRQ(UART0_IRQn);

works fine, in an application which has already started the soft device.

Am I doing something wrong, or is it not only unnecessary but actively wrong to invoke the wrapper functions with peripherals that are not restricted by the soft device? This comment suggests it's supposed to be OK.

(I'm writing code that is supposed to be independent of what soft-device it's running with, so am not trying to guess whether a particular peripheral is restricted or not.)

Parents
  • Does sd_nvic_ClearPendingIRQ() return an error? Have you tried to put a breakpoint in app_error_handler()? You need to turn off optimizations and add DEBUG as a preprocessor symbol to see the error code. Please edit your question to include the information. It would also be helpful if you could let us know what SDK version you have, and if you could upload your complete project with the fault.

Reply
  • Does sd_nvic_ClearPendingIRQ() return an error? Have you tried to put a breakpoint in app_error_handler()? You need to turn off optimizations and add DEBUG as a preprocessor symbol to see the error code. Please edit your question to include the information. It would also be helpful if you could let us know what SDK version you have, and if you could upload your complete project with the fault.

Children
No Data
Related