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

nRF52840 multiperipheral with very low power sleep mode

Hello, I want to make multiperipheral system with nRF52840 (Im using 4x nRF52840DK). Im using latest SDK17. I wrote criteria i want to put to this system below:

1. Devices are supposed to be connected with BLE

- One central device

- Minimum three peripheral devices

2. Peripheral devices are supposed to be in sleep mode

- Sleep time ~1min

- System ON, full 256kB RAM retention, wake on GPIOTE - PORT event (power consumption in sleep mode less than 3uA)

- I don't want any advertising in sleep mode

3. Peripheral devices are supposed to be wake up with port event and then i want to send 8kB of data over BLE from RAM

- uint8_t data[8192];

- data need to be send with the highest througput posibble

4. Central device is supposed to only recieve data

- not needed sleep mode

- data need to be written in internal RAM (uint8_t data[3][8192];) or something similar

And my questions are:

How to start?

What are the best examples to modify?

It is posibble to achieve constant 3uA current consumption in sleep (1min) and after wake up send the data in 60ms (after that again go to sleep)?

Best regards

Rafał Dolny

Parents
  • Hello Rafal,

    First of all, do you intend to connect to several devices at once, or do you only need to connect to one at the time (at one minute intervals)?

    If you need more connections, I suggest you look into the ble_central\ble_app_multilink_central for inspiration, and change out the service (LBS, led button service) with the ble_nus_c sample.

    If you only need one connection at the time, start with the ble_app_uart_c as your central project. The peripherals can use the ble_app_uart example. 

    What you need to implement is the sleep system you like, and the transfer of the data. When you are done transferring, you can disconnect (can be done from the central or peripheral). Then when you disconnect, stop the advertisements (or don't start them), and set an app timer for 1 minute. If you are using System on mode, you can just leave the main function as is, and system on mode is used whenever it can from the main()'s while loop. 

     

    It is posibble to achieve constant 3uA current consumption in sleep (1min) and after wake up send the data in 60ms (after that again go to sleep)?

     Yes. That should be feasible (Not including when you are actually transferring all your data). 

    Best regards,

    Edvin

  • Hi Edvin,

    Thank You for Your reply. I don't know which solution is better for lowest possible current consumption. I think I can have one connection at the time. I've tried ble_app_uart & ble_app_uart_c but i haved some problems. I don't know how to disable advertising when Im not sending any data. Because of advertising I don't know in what kind of sleep mode it is. Can You tell me please (If You know) how to change ble_app_uart for something like that?

    1. Turn power on

    2. Connect BLE peripheral -> central

    3. Go to sleep (stop advertising)

    4. After for example push the button -> wake up

    5. Send data over BLE from data[8192] -> i thing there will be 34 packets per 244bytes

    6. Go to sleep (stop advertising) and wait for button

    Best regards,

    Rafał Dolny

  • Hi Rafał,

    Can you say what exactly happens during this time? What is your connection parameters? Do you pair? Do service discovery? Other things? How much data do you send and how? All this is needed in order to understand why the time is so long (and if anything could be done about it). Also, a sniffer trace is very useful to understand what happens.

    The spikes you refer to, is that current spikes? If so, it could be advertising, I cannot say without knowing more. Can you share a plot?

    Einar

  • Hi Einar,

    In first stage i see the connection have 1Mbps phy. To change to 2Mbps it needs arround 300ms. In the next step I see another 100-300ms then peripheral does not transmitt any data. After that I can see transmission.

    Im using ble_app_uart with 2Mbps phy, delay for viewing on oscilloscope and your suggestion with advertising_init().

    Best regards

    Rafał Dolny

  • Hi Rafał,

    Which connection parameters do you use? Can you share a sniffer trace? Also, please zoom in on the spikes on several plots so that I can se the shape in detail.

  • Which connection parameters do You mean? I don't know about sniffer trace. Here I put pictures in order from previous file.

    1. https://imgur.com/a/vcMLyRU (Start advertising)

    2. https://imgur.com/a/KldQtzM (Negotiated 2Mbps)

    3. https://imgur.com/a/xSy2DXe (Ready to send - I think)

    4. https://imgur.com/a/NvWrBSE (Transmission begin)

Reply Children
Related