This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

how to set ram size in keil for nrf51822?

hello, i am using ble_uart_app project in that i have added the pwm feature and added my code. i have tested my code seperately it works fine but when i have added in the ble_app_uart folder my ble connection getting disconnected and in nrf toolbox in uart i had seen the log it shows gatt error(0x85) will you please tell me why this is happening?why my bluetooth connection gets disconnected. i have attached map file here please refer this and please tell me is there any ram issue due to which my device is getting disconnected. the map file is as follows:

      Code (inc. data)   RO Data    RW Data    ZI Data      Debug   

     23476       1898        416        280       3864     508922   Grand Totals
     23476       1898        416        280       3864     508922   ELF Image Totals
     23476       1898        416        280          0          0   ROM Totals

==============================================================================

    Total RO  Size (Code + RO Data)                23892 (  23.33kB)
    Total RW  Size (RW Data + ZI Data)              4144 (   4.05kB)
    Total ROM Size (Code + RO Data + RW Data)      24172 (  23.61kB)

i have just added grand total please refer it and tell me if it is ram issue. and give me the suggestion how i can change it vin keil compiler.please forward me detailed memory map of nrf51822.

Thank you,

Pallavi

  • I took a look at your code, and the problem seems to be that you are accessing flash directly (erase/write) when the SoftDevice is enabled (in your write_AC_data() function ).

    If you use the SoftDevice, direct access to flash is restricted. We suggest you to use the fds library. fds is a simple file system, you don't have to worry about the address you store the variable or how you back up data when erasing a page. Fds is used in our ble example in the SDK, we have a small example here(for SDK-11). For SDK 12 see this link ). If you don't want to use fds, you can look into using the write/erase flash softdevice functions(e.g. sd_flash_write), but I would suggest giving fds a try first.

  • Thank you sir.first i will take a look on the fds code.then i have to understand its concept i.e how to store data on fds. after that i have to impliment all my functions on that.if there is any problem then ill take you help. but for now thank you for your ans.

    Thank you,

    Pallavi

  • sir i have seen in sdk in nRF5_SDK_11.0.0_89a8197 (1)\examples\peripheral folder there is no fds example .i havent seen fds example in sdk 11.0.0 .and also in nRF5_SDK_11.0.0_89a8197 (1)\examples\ble_peripheral this folder.there is no fds example code is given. there is fds only in library nRF5_SDK_11.0.0_89a8197 (1)\components\libraries.but i am looking for code so that first i can understand the fds concept.the github link you have shown in that there is no downloading option.so will you tell me where i can get the code for fds so that i can test it according to my requirement seperately then i wll add this to my main code.

    Thank you, Pallavi

  • See this github page. Click the "Clone or download" button, and click download ZIP. Put the example you want in your SDK folder.

    image description

Related