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

CMSIS RTOS with nRF51822 and S110

I'm looking into using the CMSIS RTOS on the nRF51822 with the S110 softdevice which I've used successfully with other Cortex M0 MCUs. I realize the S110 isn't well tested with various RTOS, but documentation indicates it should be possible.

When initializing the softdevice stack with the call to sd_softdevice_enable(), the return code is 0x0D which nrf_error.h indicates is NRF_ERROR_TIMEOUT. However, the documentation for this function in the header files doesn't indicated this is an expected error to be returned. I'm assuming there is some sort of conflict between the RTOS and the softdevice, but it's unclear what the nature of the timeout might be.

Any hints on where I can look to track down the cause of this issue?

Also, if I get the above issue worked out I'm a bit worried about a conflict between the SVC handling by the softdevice and the RTOS. Since the softdevice controls the SVC interrupt handler, I'm assuming it properly chains the SVC calls intended for the RTOS use. Or, is this a bad assumption on my part.

Thanks,

Mike

Parents
  • Hi Guys,

    I am just about to start a project with the 51822 and wanted to use the RTX RTOS. But I only have a couple of months for this project and wasn't too sure if I can pull it off in time. But seeing the kind of progress you are making is giving me hope that this could work. One thing I am still not too sure about is the interrupt latency. My understanding is that the max latency can be as high as 5ms+. Do your applications tolerate this latency or how did you deal with this?

    Thanks

  • Mike - thanks so much for your response. I realize now the latency is practically the same regardless of whether an RTOS is used or not, so I guess I will stop worrying about it.

    You modified the RTOS to use RTC1 in place of the sysTick. I am assuming you modified the RTX_Conf_CM.c file. How did you set up the last function - os_tick_irqack? I am assuming you pointed the RTC1 exception to the original sysTick handler. Where is the sysTick handler function set up to be an exception handler? This might be a silly question, but this is the first time I am delving into the RTOS internals. Can I just rename the RTC1 handler to sysTick handler and that would do it? Also, why is there an exception handler for the sysTick in the arm_startup_nrf51.s file when there is no sysTick timer?

    For the RTC1 conflict with ble_conn_params modue, did you end up using the RTOS's timer? I am curious.

    Regards.

Reply
  • Mike - thanks so much for your response. I realize now the latency is practically the same regardless of whether an RTOS is used or not, so I guess I will stop worrying about it.

    You modified the RTOS to use RTC1 in place of the sysTick. I am assuming you modified the RTX_Conf_CM.c file. How did you set up the last function - os_tick_irqack? I am assuming you pointed the RTC1 exception to the original sysTick handler. Where is the sysTick handler function set up to be an exception handler? This might be a silly question, but this is the first time I am delving into the RTOS internals. Can I just rename the RTC1 handler to sysTick handler and that would do it? Also, why is there an exception handler for the sysTick in the arm_startup_nrf51.s file when there is no sysTick timer?

    For the RTC1 conflict with ble_conn_params modue, did you end up using the RTOS's timer? I am curious.

    Regards.

Children
No Data
Related