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

  • A quick look at my simple reference project indicates that all the RTOS modules combined with all features enabled is about 12K of Flash and about 2K of SRAM. The Flash usage can be minimized if you don't include certain features of the RTOS. The SRAM usage varies greatly by project and how many threads you need for the application and whether you need a timer thread. I typically configure about 400 bytes of stack space per thread. Features such as MUTEX and Mailqueues will consume SRAM as well.

Reply
  • A quick look at my simple reference project indicates that all the RTOS modules combined with all features enabled is about 12K of Flash and about 2K of SRAM. The Flash usage can be minimized if you don't include certain features of the RTOS. The SRAM usage varies greatly by project and how many threads you need for the application and whether you need a timer thread. I typically configure about 400 bytes of stack space per thread. Features such as MUTEX and Mailqueues will consume SRAM as well.

Children
No Data
Related