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

nrf51822 qfaa has problem with eddystone example

Hi;

I am using nrf51822 qfaa device with sdk12.3. I compiled eddystone example code and it worked with nrf51dk(nrf51422_qfac) board. Also, i have a board that has nrf51822_qfaa and it does not work with my eddystone code. I think that it is about ram size. My irom and iram setting is:

NRF51422 qfac IROM1: start:0x1B000 - size:0x25000(256kb) IRAM1: start:0x20003440 - size:0x4BC0(32kb)

NRF51822 qfaa IROM1: 0x1B000 - 0x25000(256kb) IRAM1: 0x20003440 - 0xBC0(16kb)

And also my code size is:

Code=31120 RO-data=2108 RW-data=356 ZI-data=5868

As seen in the above, ram size of the code is 5868+356= 6224 byte. However, nrf51822 ram size is 3008 byte(0x0bc0).

Is there method to use eddystone example with nrf51822_qfaa? Also, Is my calculation about iram correct?

Thanks and sorry for my bad english.

Parents
  • Hi Martin;

    Thank you for your response. After I reviewed webpage about ram and rom management, I think i found a solution. According to web page, If s130v2 is used, ram settings of the nrf51822_qfaa is IRAM base - 0x20001870 and size - 0x2790(16kb). I set up my code with these IRAM settings. After that my code start to work. However, it is continuously reset and start again because my iram start address is not correct. To learn what it is iram base(start) adress, i add a break point inside the softdevice_enable() function. I think that "app_ram_base" variable inside softdevice_enable is our IRAM start adress and it is equal to 0x20001FE8 at debug. We can also easily calculate the our ram size. It is equal to (0x2790 - (0x20001FE8 - 0x20001870)) = 0x2018. When Iram base adress is 0x20001FE8 and size is 0x2018, eddystone example code have started to work correctly.

    Is this valid solution? Or, Does my code hang in some situation?

  • It sounds like you got it right. The reason you sometimes have to debug and get the address from 'app_ram_base' is that the Softdevice requires different amounts of RAM according to how many services and characteristics you have, what bandwidth configuration you use, etc.

Reply Children
No Data
Related