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

Query regarding the power and memory

Hi,

I have the below queries regarding the power consumption and memory

1) If my device is connected to the mobile phone and if it is scanning and the same it is advertising also.

-  My scanning period and scanning interval both the same to scan fully for an infinite time.

-  So how does the device stay connected and advertise also simultaneously?

-  After all only one antenna how this takes place?

2) what could be the power consumption if the device connects more often in every one minute.

3) How much internal flash memory can I use??

for the device nRF52840(512 kb flash)

Or how can identify how much memory is taken by BLE stack and code??

Parents
  • Hi, 

    1) the chip doesn't do all things simultaneously. Most time is spent in scanning mode, and when the time for advertising or connection event comes, it switches to that mode for a short interval of time, then returns back to scanning.

    2) if scanning is configured for 100% window and CPU is in low-power mode, power consumption will be close to receiver current (e.g. 4.6 mA @3V with enabled DCDC), other activity will not impact essentially. For advertising or connected mode without scanning, take a look at online power profiler.

    3) You can find memory requirements in release notes for your SoftDevice. For example, S140 version 6.1.1 takes 152 kB of flash. 

    for the device nRF52840(512 kb flash)

    AFAIK trere's only 1-MByte version of 52840...

Reply
  • Hi, 

    1) the chip doesn't do all things simultaneously. Most time is spent in scanning mode, and when the time for advertising or connection event comes, it switches to that mode for a short interval of time, then returns back to scanning.

    2) if scanning is configured for 100% window and CPU is in low-power mode, power consumption will be close to receiver current (e.g. 4.6 mA @3V with enabled DCDC), other activity will not impact essentially. For advertising or connected mode without scanning, take a look at online power profiler.

    3) You can find memory requirements in release notes for your SoftDevice. For example, S140 version 6.1.1 takes 152 kB of flash. 

    for the device nRF52840(512 kb flash)

    AFAIK trere's only 1-MByte version of 52840...

Children
  • Hi Dmitry,

    Thanks for the quick response.

    I same some more queries.

    1) if the device is in central + peripharal mode, and if device gets connection request from mobile, when it is scanning.if scanning is period is 1 scan. and advertisement interval 400ms. so how does it gets handled? will the device will get connected to mobile app?

    2) Does device gets connection request during 1 second of scanning time?

    3) while connecting can it also scan?

    4) where this BLE stack runs? does it also takes RAM?

    If my RAM is 32kB.

    I want to keep of 5KB of data in RAM and if my application size is around 25 KB (size is calculated according to  example code "ble_app_multirole_lesc"). still 2 kB will be free.

    So Is it good to keep scanned "advertisement data" in RAM?

    5) Is there any power mode available in which scanning and connectable advertisement can run?

  • 1,2,3) Connection request is made by central right after advertising packet, central will wait some time for it. And yes, it can scan all the time when it is not in an advertising or connection event. If you're interesting in deeper details, you can find them in Bluetooth Core specification. Don't worry about such things, they're handled at low level for you.

    4) Of course, BLE stack needs some RAM, the size depends on your configuration. Here you can read about memory usage by SoftDevice.

    I want to keep of 5KB of data in RAM and if my application size is around 25 KB

    Do you mean "RAM usage by your application"? An application itself is stored into flash memory.

    So Is it good to keep scanned "advertisement data" in RAM?

    It's your RAM, you can store whatever you want Slight smile

    What chip do you have?  nRF52840 has 256 kbytes of RAM, only QFAB variant of 52832 has 32k.

    5) I didn't get your question.. power modes are not related to bluetooth roles

Related