This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_ble_enable: error 0x8030F4

I've a code that worked fine on nrf52832xxAA chip. I flashed the code to a new chip nrf52832xxAB (less RAM, ROM) and adjusted the scatter file according to sd ble recommendations:

RAM START ADDR 0x20000000 should be adjusted to 0x20001FE8
RAM SIZE should be adjusted to 0x6018

And I still have an error :

sd_ble_enable: RAM START at 0x20001FE8
sd_ble_enable: error 0x8030F4

Thanks in advance.

  • Hi

    sd_ble_enable will return an error in the following cases:

    • The BLE stack has already been initialized
    • An invalid or insufficiently aligned pointer is supplied
    • The amount of memory assigned to thh SoftDevice by *p_app_ram_base is not large enough to fit the configuration's memory requirement
    • The dynamic part of the SoftDevice RAM region is larger than the supported maximum size.
    • The total number of L2CAP channels configured is too large

    It doesn't seem like the error code is printed in your RTT viewer unfortunately, this could be due to the SDK version you're using being too old to have errors implemented properly, or you are just printing the address where the error takes place and not the error code. Which SDK version are you using for development? I'm guessing the error we're seeing is that there's not enough memory either in the RAM or ROM region of the xxAB board.

    What is the RAM and ROM size of your application + SoftDevice exactly? The only thing that should be the difference between the two boards should be the memory size. Also, what revision of the nRF52832 xxAA and xxAB do you have?

    Best regards,

    Simon

  • Hi, The revision of the chip that I have is N52832QFABE02114EK what is engraved on the chip. 

    About the SDK, I'm using SDK V11 with it's softdevice V2. Do you think that I can replace the softdevice folder by v7 and it may work? Or I need to replace all the SDK and make the adjustment? 

    There were so many customizations on the SDK that replacing it may take some more time for me which is unacceptable. 

    Where can I know what is the necessary RAM and ROM used by softdevice?

    I send you the compilation result where you can find the allocated memory informations:

    Program Size: Code=60948 RO-data=43652 RW-data=324 ZI-data=16628  

    Program Size: Code=60304 RO-data=43632 RW-data=324 ZI-data=12436   (with option MicroLib on Keil)

    And in my code folder I found that s132_nrf52_2.0.0_softdevice.hex file has 303kb size (on my disk). What does it mean, is this file flashed to the nrf?

    An other point: in the beginning of my main function there was a code for ram retention issue initially, do you think that I need to keep it for QFAB chip? Or adjustment needed?

  • Hi

    Okay, this revision of the nRF52832 xxAB should be compatible with SDK v11.0.0 and SoftDevice v2. The SoftDevice v7 will not alongside SDK v11 I'm afraid, so if you don't have time to move the application to a newer version, you're stuck with this version. If you should decide to move to a newer SDK version, I would recommend starting with a new project instead of trying to migrate the one you have, as a lot have changed since SDK v11.

    The amount of RAM and ROM used by the SoftDevice you're using can be seen in the SoftDevice specification, downloadable here. In order to see the total of your application and SoftDevice by checking the size of the .hex files generated when building the application in Keil. If SoftDevice + application .hex files is bigger than 256kB together the application flash is larger than the QFAB flash size.

    Best regards,

    Simon

  • As you told the app+softdevice memory is 300Kb so bigger than QFAB chip flash memory size.

    Thanks for your support and advices.

Related