This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540 GPIO state under low power mode

Other Parts Discussed in Thread: CC2540

hello sir;

  I am running a CC2540 based board with two LEDs connected to P0.1 and P0.0  Also a buzzer is driven from PIO1.6.   I try to run the keyfobdemo under BLE SDK1.2 and turn on both LEDs and start advertisement  from system start .  It seems that the LEDs will flash.  then after the advertimement timeout , the LEDs continue flash,but slower.

 If the power saving is turned off  for whole system , the LEDs state will be OK(keep on). i find flowing infrmation form CC2540 guide.

"In power modes PM1, PM2, and PM3, the I/O pins retain the I/O mode and output value (if applicable) that was set when PM1/PM2/PM3 was entered"

so the low power mode will influence the GPIO state or power?

 

 

 

  • daniel su said:
    so the low power mode will influence the GPIO state or power?

    Entering to lower power modes, such as PM2/PM3 shouldn't have an impact on the state of pin/s,

    however, if a pin configured as peripheral then the state of that pin can be affected, since most

    of peripherals are not functional during PM2/PM3

  • Hi Daniel,

    The Keyfobdemo project uses some HAL drivers for LEDs. You will note that in a function called HalLedEnterSleep under HAL/Target/CC2540EB/Drivers/hal_led.c in the IAR project, the LEDs are turned off during sleep. This is because they draw a high amount of current (~15-20mA maybe), so the battery will be drained very quickly.

    Best regards,
    Aslak 

  • Hi  Aslak,

         you are right. I find the problem . HalLedEnterSleep called from HalSleep  causes  this.  Thanks a lot.

     Best regards,

       Daniel