• AVR Freaks

Hot!RN4871 power modes

Author
traversjames
Starting Member
  • Total Posts : 21
  • Reward points : 0
  • Joined: 2017/04/26 15:06:38
  • Location: Ireland
  • Status: offline
2017/04/27 12:49:27 (permalink)
0

RN4871 power modes

Hi,
I was going around in circles a bit trying to establish how to enable different power modes on the RN4871 and what they mean for device behaviour so I made a list of the power-mode references below.  In particular, I am trying to enter the lowest power mode which draws 1 - 1.7uA according to the datasheet.  Note, this is called variously 'low-power', 'shutdown', 'deep-sleep', and 'dormant' mode throughout the docs (if they are actually the same) - some consistency might aid in comprehension.  Anyway, what I was trying was:
  1. "$$$"  to enter command mode 
  2. "SW,0A,00"  fix to reduce power through P1_2 pin (release notes)
  3. "SW,0C,04"  command to enable UART Rx Indication on P1_6
  4. "SO,1"  command to enable low-power mode
  5. Reboot to apply settings
  6. Pull down P1_6
  7. "$$$"  to enter command mode 
  8. "SO,1"  command to enter low-power mode (seems necessary)
  9. Assert P1_6
This puts the device in a low-power mode but I am at best stuck with 60ua current draw.  I have tried tristating all input pins from the MCU to allow the module pull-ups to work, and various pin combinations but always get a multiple of around 60us which I presume corresponds to the pullup/down resistors on the IOs.  Regardless what I do there is still always one active.
I have also tried just pulling the RST_N pin low but this also gets me to a 60ua situation - possibly from the pullup on this pin?
 
Anyway, has anyone been successful in reaching the lowest-power target?  Note I have tried this completely off-board as well with only a low-leakage decoupling cap so it is not being sourced from other components on the board.

Data Sheet:

Table 1.4: UART RX Indication: Pull down this pin to enable UART comms in low-power mode
Table 1.4: Pairing key: Pull down this pin to force the module into standby mode
Table 2.3: Standby current 1.9 - 2.9 uA
Table 2.3: Power-saving 1.0 - 1.7 uA
Table 2.4: Standby mode (Advertising interval 100ms) 230 uA
Table 2.4: Standby mode (Advertising interval 500ms) 77 uA
Table 2.4: Shutdown mode 1.44 uA

User Guide:


2.4.19: SO,1 command enables low-power operation. Also uses term "deep sleep".
2.6.27: O command puts the module into Dormant mode

Firmware 1.18.3 Release Notes:

4.6: Deep sleep current (not sure if this applies to non-PICTail operation). Configure P1_2 as None.
 
#1

3 Replies Related Threads

    traversjames
    Starting Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2017/04/26 15:06:38
    • Location: Ireland
    • Status: offline
    Re: RN4871 power modes 2017/04/28 08:27:51 (permalink)
    0
    Ok, a bit more investigation and it seems the device was still advertising while in low-power (SO,1) mode, so this probably accounts for the 60uA.  I tried to address this by turning off advertising but this threw up a couple of further strange observations:
    1.  If the default (fast->slow) advertising is halted with the 'Y' command during the fast period, advertising will restart when the slow-period should commence.  I don't think this would be desired behaviour so probably a bug.
    2. Attempting to enter low-power mode when not advertising does not work.  In trying the command sequence "Y", "SO,1" and then deasserting RX_IND, the UART remains available and the current stays high.  There is no issue doing this when advertising is ongoing.
    3. Starting advertising with a timeout specified, e.g. "A,03E8,002F" and then entering low power-mode works.  The device is bumped out of this mode when %ADV_TIMEOUT% is returned though.
    So, it looks like the mode can't be entered while advertising which will always draw current.  The reset state draws current above the required level as well.  Finally, the "O,0" Shutdown or Dormant command seems to just perform a reboot.
     
    So where is this elusive mode?
    #2
    traversjames
    Starting Member
    • Total Posts : 21
    • Reward points : 0
    • Joined: 2017/04/26 15:06:38
    • Location: Ireland
    • Status: offline
    Re: RN4871 power modes 2017/05/02 13:46:42 (permalink)
    5 (1)
    Ok, I think I have found a solution to this but it took searching the documentation on the BM71 module which is the same physically, just with lower-level firmware access.  This points out that low-power and shutdown are distinct modes which are entered in different ways.  The low-power mode was what I had already reached using the RX_IND pin and this mode continues advertising.  The shutdown mode can also be entered with a pin, LINK_DROP, but has an alternative software activation through the 'O' command.  I had tried this command previously with no luck but I tested some more scenarios to get it working.  The sequence I was using was:
    1. In low-power mode (RX_IND high)
    2. Pull RX_IND low to exit low-power
    3. Wait 5ms to access UART
    4. Send "$$$\r" and wait for response
    5. Send "O\r" to shutdown
    6. Return RX_IND high
    Doing this nothing happened, but if I entered a delay (5ms) before the shutdown command it worked.  I have no idea why this is as I had waited for the prompt but at least there is a workaround.  I now have the full board with MCU, RN4871 and passives drawing only 1.7uA in shutdown!
    post edited by traversjames - 2017/05/02 13:49:27
    #3
    ASICAlex
    Starting Member
    • Total Posts : 49
    • Reward points : 0
    • Joined: 2018/02/27 15:40:02
    • Location: 0
    • Status: offline
    Re: RN4871 power modes 2020/06/10 22:02:57 (permalink)
    0
    I am looking into the power modes also.  For the dormant mode, it says to assert RX_IND before you send the O,0 command.  But it doesn't say how long it takes for the UART to shut down after you assert RX_IND (to be able to send the O,0 command)  This is to be able to get it out of dormant mode when you deassert the RX_IND.  I will just try to do it as fast as possible and see what happens.  Also, I am running into the issue of when I have a phone connected to the rn4871, if I put it in "low power mode" by asserting RX_IND, the UART is still active.  If I do not have anything connected to the RN4871, then the UART does stop working as expected and I can bring it back up by deasserting RX_IND (I think you referred to this as the UART stopped working when advertising, but would not act as expected when advertising).  I was wanting to see how much current the low power mode drew to see if I could keep the connection alive, but I guess I will have to do the dormant mode. 
     
    Did you have any more revelations?  Or did you just end up using the dormant mode for your only power down?  I guess when it is in dormant mode, the client that you are talking to will have to periodically scan for the device for when it finally comes out of dormant mode and starts advertising again. 
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5