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

Nuttx port question on SVC handler

Hi Nordic,

I'm porting hrs application on nuttx OS. But when I call sd_softdevice_enable function, it goes to "RESET". I read below article which mentions that SVC handler is in soft device, but my coworker said that we have to implement our SVC handler on nuttx OS by ourselves. So I'm very confused. When sd_softdevice_enable gets called, it'll go to SVC assembly code which specify the SVC number. Then what else will the application do? Or will it just pass to SVC handler in Softdevice?

devzone.nordicsemi.com/.../Introduction_to_the_S110_SoftDevice_v1.0.pdf

Thanks, Mich

Parents
  • @Mich: The SVC handler is in softdevice. You don't need to implement your SVC handler. But you need to make sure you initialized the softdevice. Do you have any kind of bootloader in your nuttx OS ? By default if you don't have bootloader, the softdevice will be initialized first before it branches to the application.

    All softdevice API calls are SVC calls, and they are handled inside the softdevice. The application doesn't need to do anything. If it crashes there must be because of something else, could be wrong context priority when you call the function ?

Reply
  • @Mich: The SVC handler is in softdevice. You don't need to implement your SVC handler. But you need to make sure you initialized the softdevice. Do you have any kind of bootloader in your nuttx OS ? By default if you don't have bootloader, the softdevice will be initialized first before it branches to the application.

    All softdevice API calls are SVC calls, and they are handled inside the softdevice. The application doesn't need to do anything. If it crashes there must be because of something else, could be wrong context priority when you call the function ?

Children
No Data
Related