issue with nRF52811 and S140 softdevice


I have downloaded the nRF5 sdk v17.1 and used the peripheral blinky example with pca10056e and S112 soft device and modified the preprocessor defines and this example is working fine. Now my problem is that I want to use the le coded option to have more range and i saw it is not implemented in S112. So I used the same example but for pca10056 and S140 and replaced startup_nrf52840 by startup_nrf52811, same for system_nrf52811, then modified the FLASH PH SIZE to 0x30000 and ram ph size to 0x6000 and adjusted flash size to 0x9000 (30000-27000 in hex) adjusted ram size to 3da0 (6000-2260) and changed target to nrf52811_xxaa

here i build and get errors saying no physical fpu so i search for this and also found that in the project option there is in code generation options the fpu type so i changed FPU ABl type to soft, fpu type to soft, clean rebuild and everything is building and linking ok. Then i flash into the target and the application is not starting

I see that S140 is supporting the nrf52811 but if you built it with a hardware fpu then of course it is not going to work so my question here is, is it correct that S140 support the 52811 without hardware fpu ? or did i missed something ? I even increased heap and stack to 4096 without luck.

I also tried from the working project pca10056e + s112 to modify this project to use s140 and changed flash start and ram start and replaced all s112 links to s140 links same to point to s140.hex file and same result application seems to not start as it is supposed to switch on an led when it does and no led is on.

So any ideas ? is my assumption about fpu correct and s140 needs a hard fpu then it exclude the 52811 or is it something else ?

thank you for any leads or if anyone has made it working a S140 on a 52811 ?

  • ok i have found the issue apparently the ram start is different depending on the target device i found in another thread that one has to set RAM_START=0x20002a38;RAM_SIZE=0x35c8 for the nrf52811 it seems the soft device use 0x800 more than what is configured in the project. The example is now working but I think you should advertise exactly which value to set as ram start in the release notes of S140 because you write it needs 1.75kb ram stack (0x700) and 5.6kb ram (0x1678) minimum but in fact needs 10.8 kb (0x2a38). I understand it depends on what is activated but still why a 0x2260 is enough when working on a nrf52840 and not on a nrf52811.
    What would be great is a tool to estimate ram usage of softdevice depending on features activated or deactivated.

  • Hi, 

    Good to know you fix the issue. The minimum required memory of S140 is 5.6 kB (0x1678 bytes) that means the SD basically require. In other words, SD need more than that if the application run some features like increase NRF_SDH_BLE_VS_UUID_COUNT or link count. In that situation, You will get this in the log:
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20002A38 to 0x20002A48.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3D5B8.

    Then, refer to the log to modify RAM_START and RAM_SIZE.