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

RAM Banks (RAM retention)

How are the four RAM banks divided up in the nRF51822? Is it an even split of the 16K total RAM (i.e. 4K per block)?

Furthermore, can I expect strange results if I turn on RAM-retention for the 8K of RAM the SoftDevice uses?

Thanks :)

Parents
  • The size of the RAM blocks are given in section 3.2.2 in the PS.

    I don't believe anything strange should happen if you enable RAM retention with the S110, but I'm not sure whether it has been tested or not.

    It should be noted that you may need to take some care to avoid the RAM being zeroed on startup.

    Such care will be toolchain specific, but this thread on Keil's forums contains some tips on how to do it with Keil:

    1. Exclude the memory area from the project settings, and just use a raw pointer.
    2. Use a scatter-file and declare an area as UNINIT, like this:
    
    RW_RTCRAM 0xE0084000 UNINIT 0x000007FF
    {
        main.o (rtc_ram)
    }
    
    

    Edit 1: Added info on how to avoid initialization. Edit 2: It seems that marking a section of the memory as NoInit in Keil's target options should also do the trick, according to this question.

Reply
  • The size of the RAM blocks are given in section 3.2.2 in the PS.

    I don't believe anything strange should happen if you enable RAM retention with the S110, but I'm not sure whether it has been tested or not.

    It should be noted that you may need to take some care to avoid the RAM being zeroed on startup.

    Such care will be toolchain specific, but this thread on Keil's forums contains some tips on how to do it with Keil:

    1. Exclude the memory area from the project settings, and just use a raw pointer.
    2. Use a scatter-file and declare an area as UNINIT, like this:
    
    RW_RTCRAM 0xE0084000 UNINIT 0x000007FF
    {
        main.o (rtc_ram)
    }
    
    

    Edit 1: Added info on how to avoid initialization. Edit 2: It seems that marking a section of the memory as NoInit in Keil's target options should also do the trick, according to this question.

Children
No Data
Related