Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

UART Data byte corrupt when calling nrf_pwr_mgmt_run(); in main while loop.

I am using nRF52805(SDK 17.0.1 & S112) in my application development. Designed GATT Table Having some custom services with read, write & notify properties, And also, there is some data communication in between nRF52805 & Host Microcontroller via UART interface(libUARTE is used for handling all communication) for updating custom characteristics, I need to do power optimization as device is battery operated, so power management is initialized by "power_management_init();" function & everything working fine until I'm calling nrf_pwr_mgmt_run(); in main while loop . But upon calling "nrf_pwr_mgmt_run();"  some UART data byte got corrupted (I'm suspecting) & some times application gets stuck(may be goes into unknown/unrecoverable state). Also, I'm suspecting some kind of event time handling issue between softdevice & application interrupts.

My question is below:

  1. is there any limitation of using libUARTE in Power Management mode.
  2. I also tried app_uart for my application and facing same kind of issue, so is there any better way to handle heavy transection of data on UART having ble stack enabled.
  3. In power management (when calling nrf_pwr_mgmt_run();) need some specific setting to reduce current consumption & How it is working in real scenario.  

please suggest me for above points.

Thanks.

Parents
  • Hi

    As you can see, the nrf_pwr_mgmt_run() function (in nrf_pwr_mgmt.c) prepares the device for sleep, and goes into a mode where it waits for an event to wake it up. So whenever an event occurs on the nRF52 it will wake back up and you can initialize the libUARTE and resume operations. Some of the (most common) wake up options are as follows: You can set a timer to trig an event after X amount of time or you can have a physical button if you want to wake it up manually.

    Best regards,
    Simon

  • Hi, I don't have any physical button interface for wake-up (as device is not directly accessible to user). And also i need to remain in system on state always, because user can connect at any time. Although , I need to get BLE current consumption with in 300- 400 uA. so,Is there any way to reduce the current consumption without setting up wakeup source  & and also capable of tx/rx data on UART within sleep mode. This is the requirement of my application.

    please suggest.

    Thanks 

Reply
  • Hi, I don't have any physical button interface for wake-up (as device is not directly accessible to user). And also i need to remain in system on state always, because user can connect at any time. Although , I need to get BLE current consumption with in 300- 400 uA. so,Is there any way to reduce the current consumption without setting up wakeup source  & and also capable of tx/rx data on UART within sleep mode. This is the requirement of my application.

    please suggest.

    Thanks 

Children
No Data
Related