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

More/almost same current consumption when executing code from RAM instead of flash

Hi ,

According to nRF51822 Product Specification, running code from flash draws about 4.1mA and running it from RAM draws 2.4mA. But when I tested my code it draws more current/almost same when executing code from RAM compared to flash execution.

Below are the software version i am using for my development

1.GCC environment. 2.SD S110 7.1.0 3.SDK 6.1.0

I am using attribute((used, long_call, section(".data"))) for the functions(whichever I am defined) to move to RAM except Soft device calls since softdevice calls executes from flash only.

Please let me know the reason for this.

Regards, Anand

Parents
  • Is this the same code you were asking about last week? The bit where you were calling division routines? I pointed out at the time that all those calls into any system routine went right back to flash, and division is slooooowwwwww so it spends a lot of time in flash.

    Are you sure your code is actually spending most of its time executing in RAM or do the calls to system routines and the softdevice, plus all the softdevice code constantly running itself mean that you're really spending most of your time in flash anyway? I'd have expected that anything running the softdevice is going to spend so much time in flash that it's pretty pointless moving a little of the user code to ram.

    Is current consumption actually an issue in your app you need to solve or are you just pre-optimizing?

  • For views on optimizing power, look at the current consumption guide on this thread.

Reply Children
No Data
Related