This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf51822 stops broadcasting

Hey folks, I am having a little trouble with my nrf51822 at the moment and needed some help. I am currently using a highly modified version of the ble_app_temp project with 2 accelerometer inputs, one as a wake up sense pin and one that is polled every 100ms to send the chip into system off mode when the chip is not moving.

While testing these chips on my bench meter I have seen several times where my average current draw goes from what I expect (~5uA in system off and what reads as ~.2mA while turned on) to 2.5mA and no longer broadcasting.

I realize that the current readouts on my multimeter are far from accurate since they are changing so rapidly, but I at least know what it should look like while it is operating normally and the 2.5ma amp behavior accompanied by not broadcasting advertising packets seems to be indicative of a problem.

After spending some time in this 2.5mA state the chip will drop back down to .7mA and continue not broadcasting.

Could my chip be falling into programming mode some how? I know we had that problem before but we added the necessary pull down resistor to the swdclk.

Could simultaneous firing of my wake-up/ sleep interrupts be causing this?

I have three timers running in my code, 1 for advertising interval, 1 to update the adc reading on my batter so the adc is on as little as possible, and one to delay the main function untill the wake-up interrupt has been fired 4 times in a window. Could one of these firing at the same time as my sleep interrupt be causing this?

That's all of my guesses, any help is appreciated.

-Chris Butler

Parents
  • The current consumption you describe should be a good indication to what's happening. The .2 mA period (if it's short) sounds like the start up current for the 16 MHz internal RCOSC and then into the main loop. If you run code from RAM the current consumption would be around 2.5 mA, if from flash it should be around 4 mA. Then the 0.7 mA sounds like you have the internal 16 MHz RCOSC running (750 uA).

    It sounds like one of your peripherals are interrupting your sleep and hence not going into the correct sleep mode again. That the advertising stops sounds like you are outside your normal routine and in a wait state for some SPI/UART/I2C event that you did not intend? Could it be that one or more of your GPIOs are floating during sleep and could cause the chip to wake at unfortunate moments?

Reply
  • The current consumption you describe should be a good indication to what's happening. The .2 mA period (if it's short) sounds like the start up current for the 16 MHz internal RCOSC and then into the main loop. If you run code from RAM the current consumption would be around 2.5 mA, if from flash it should be around 4 mA. Then the 0.7 mA sounds like you have the internal 16 MHz RCOSC running (750 uA).

    It sounds like one of your peripherals are interrupting your sleep and hence not going into the correct sleep mode again. That the advertising stops sounds like you are outside your normal routine and in a wait state for some SPI/UART/I2C event that you did not intend? Could it be that one or more of your GPIOs are floating during sleep and could cause the chip to wake at unfortunate moments?

Children
No Data
Related