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 Keyfob demo and Power mode 2/3

We have developed our own keyfob electronic card (only 1 button) and we are testing it with the KeyFob demo.

When the firmware is starting (waiting for the button to advertise) the consumption is 235uA (PM1)

My understanding is that the consumption should be 0.9uA (PM2) because no timer is running in this dedicated firmware when the button is not pressed.

Any idea or specific point to check on the keyfob to be in PM2 instead of PM1 ?

Fred

  • Hi,

    How do you measure the power consumption?

    The BLE stack should never enter PM1, so I think it likely to be PM2 with periodic wakeups. Wakeups are generated automatically from OSAL timer timeouts, so there's probably something that's not turned off.

    It could be that the key driver is set up to periodocally poll instead of using interrupts.

    The easiest way to see what's active is to look at the timerHead variable in debug mode in IAR, looking at event_flag and task_id to find out what the timer is about.

    To properly follow the next pointer for timerHead, you should modify the timer record structure as follows in OSAL_Timers.c

    typedef struct osalTimerRec
    {
      struct osalTimerRec *next;
      osalTime_t timeout;
      uint16 event_flag;
      uint8  task_id;
      uint32 reloadTimeout;
    } osalTimerRec_t;

    BR,
    Aslak