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

Simple FreeRTOS example with softdevice doesn't work

I have created a simple program with 4 FreeRTOS threads(One time, 10 ms, 100 ms, 1000 ms) and it works fine stand alone giving me periodic tasks as expected.

Linker portion for working example:

MEMORY { FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x80000 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000 }

But this same example doesn't work at all when I use S132 softdevice.

Firstly, if I flash my hex file as it is after softdevice is flashed, I get error of being not able to write to the memory. So in my application, I try a small change with linker

MEMORY { FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000 RAM (rwx) : ORIGIN = 0x20002128, LENGTH = 0xded8 } which allows me to flash my application when softdevice is also existing on the chip.

I have tried the following solutions already but they don't work for me:

devzone.nordicsemi.com/.../

devzone.nordicsemi.com/.../

What exactly is the problem of using FreeRTOS and softdevice together?

Parents
  • Softdevice used is : s132_nrf52_3.0.0_softdevice. And like I told, the application simple has 4 FreeRTOS threads with no other interrupts or functionality. I am not using any functionality of the softdevice as of now. But I intend to in the future. I am still unclear over why the example works stand alone but not with softdevice. I get the hard fault handler inside vTaskStartScheduler call.

    Also, if I dont consider the softdevice at all, the example works when flash origin is 0x0 in linker but doesn't work when flash origin is 0x1f000.

Reply
  • Softdevice used is : s132_nrf52_3.0.0_softdevice. And like I told, the application simple has 4 FreeRTOS threads with no other interrupts or functionality. I am not using any functionality of the softdevice as of now. But I intend to in the future. I am still unclear over why the example works stand alone but not with softdevice. I get the hard fault handler inside vTaskStartScheduler call.

    Also, if I dont consider the softdevice at all, the example works when flash origin is 0x0 in linker but doesn't work when flash origin is 0x1f000.

Children
No Data
Related