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

Using the QFAC with SDKv6.1.0

Hi!

I have an application that was originally developed for the QFAA using the S310 softdevice (v1.0). During subsequent development, we ran out of RAM memory, so we got a few QFACs.

According to the compatibility matrix, version 6.1.0 of the SDK should support IC revision 3. I tried using the same code, and modifying the linker to access the extra 16KB of RAM.

SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)

MEMORY
{
  FLASH (rx) : ORIGIN = 0x00020000, LENGTH = 0x20000 
  RAM (rwx) :  ORIGIN = 0x20002400, LENGTH = 0x5C00
  NRF_UICR_GIT_VERSION (rwx) : ORIGIN = 0x10001080, LENGTH = 0x10
  NRF_UICR_APPLICATION_SETTINGS (rwx) : ORIGIN = 0x10001090, LENGTH = 0x70
}

SECTIONS
{
  .NRF_UICR_GIT_VERSION_BLOCK 0x10001080 :
  {
    KEEP(*(.uicrGitVersion))
  } > NRF_UICR_GIT_VERSION

  .NRF_UICR_APPLICATION_SETTINGS_BLOCK 0x10001090 :
  {
    KEEP(*(.uicrApplicationSettings))
  } > NRF_UICR_APPLICATION_SETTINGS
}

INCLUDE "gcc_nrf51_common.ld"

Here I changed the length of the RAM from 0x1C00 to 0x5C00. This compiled fine, but when I flashed it onto the board, none of the functionality worked.

Can anyone help me figure out how to access the extra memory, or confirm that this won't work with the version of the SDK I am using.

On a separate note, would moving to softdevice S110 (since I only use the bluetooth capabilities) mitigate the memory problems?

Thank you.

  • Can you expand on 'none of the functionality worked'? Does a debugger tell you what happened? Some of the older softdevices had a memory check in them and failed on the v3 chips, I don't know if the V1.0 version of S310 has that issue or not.

    If you're not using ANT then S310 is a bit of a waste. Can't say if it will fix your memory issues to move to something else, but V1 S310 has somewhat higher RAM usage than many of the others, there's only 1K or so between that and S110 however, 4k if you move to the latest S132.

    If you're on rev 3 chips it might be time to move to one of the more-recent softdevices, S130/S132 is where development is going to go, you can even still use the old 6.1 SDK with it if you compile against the proper headers and make a few changes to softdevice calls.

  • It hard faults and calls assert_nrf_callback() from line 185 of src/host_core.c.

    I tried to migrate to SDKv10 and S310 version 3 for some time, but the codebase is large, and I am inexperienced enough that it became a nightmare to debug. Using the S110 got memory usage down enough, so I will use that as a temporary solution, and continue debugging the migrated codebase.

  • Hi Sebastian

    RK is correct, there is an issue with early softdevices supporting the 32kB RAM of the nRF51 QFAC variant. This was fixed in S110 v7.1.0 and S310 v2.0.0, see release notes for those softdevices. Unfortunately, the issue is present in S310 v1.0.0. This is a little further explained in my answer on this thread. Also look at Mike's answer, as a possible option for you to utilize the extra RAM of QFAC with S310 v1.0.0, but I have not verified this option myself.

Related