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

Not able to switch code from NRF51822 QFAC chip to NRF51822 QFAA chip

Hello everyone ,

 We have done advertising and scanning(both in a single firmware) on nrf51822 using QFAC chip. using SDK 12. Now we want to switch our code to NRF51822 QFAA chip. but we not able to do so .. when i program same code in nrf51822QFAA  it does not work. when i Update my code only for advertising it works in both versions(nrf51822QFAC and QFAA ) . i think Ram size is the problem because when i compile my main code(which contains advertising and scanning it shows code size more than 18kb  and QFAA only have 16kb ram.

So my doubts are , Dose nrf51822QFAA chip supports both (advertising and scanning )at a time and if so what are the steps do i have to follow to convert my code to switch from nrf51822AC to nrf51822AA chip.

Parents
  • Hi,

    The size of the program itself should not matter, as the available flash is the same, but the amount of RAM might be a problem.

    The RAM requirement of the SoftDevice depends on configuration, see the documentation for sd_ble_enable() for how to obtain the minimum RAM requirement for your configuration.

    Then you must make sure to configure RAM usage correctly. If you use Keil, you do that in "Options for Target", the "Target" panel, under "Read/Write Memory Areas", where IRAM1 Start and Size are the start address and size of application RAM area. It should start at 0x20000000 plus the RAM requirement of the SoftDevice (e.g. 0x200033B0 for a randomly chosen SDK example applicaiton). Its size should be such that Start + Size equals 0x20004000 for the QFAA (16 kB of RAM) or equals 0x20008000 for the QFAC.

    Depending on your configuration, the RAM requirements of your application, and the combined stack usage of the SoftDevice and your application, the QFAA might or might not have enough RAM. In that case you can either try to reduce RAM usage by changing SoftDevice configuration, change optimization level for your application, optimize your application manually. Or, increase available RAM by continue using the QFAC.

    Regards,
    Terje

     

Reply
  • Hi,

    The size of the program itself should not matter, as the available flash is the same, but the amount of RAM might be a problem.

    The RAM requirement of the SoftDevice depends on configuration, see the documentation for sd_ble_enable() for how to obtain the minimum RAM requirement for your configuration.

    Then you must make sure to configure RAM usage correctly. If you use Keil, you do that in "Options for Target", the "Target" panel, under "Read/Write Memory Areas", where IRAM1 Start and Size are the start address and size of application RAM area. It should start at 0x20000000 plus the RAM requirement of the SoftDevice (e.g. 0x200033B0 for a randomly chosen SDK example applicaiton). Its size should be such that Start + Size equals 0x20004000 for the QFAA (16 kB of RAM) or equals 0x20008000 for the QFAC.

    Depending on your configuration, the RAM requirements of your application, and the combined stack usage of the SoftDevice and your application, the QFAA might or might not have enough RAM. In that case you can either try to reduce RAM usage by changing SoftDevice configuration, change optimization level for your application, optimize your application manually. Or, increase available RAM by continue using the QFAC.

    Regards,
    Terje

     

Children
No Data
Related