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.

PM3 state with IAR

Other Parts Discussed in Thread: CC2530, CC2533

Hello,

CC2533F32 and IAR embedded Worbench

The µC don't switch to PM3 mode. The code is:

SLEEPCMD = (SLEEPCMD & 0xFC) | 0x03;
                  asm("NOP");  
                  asm("NOP");
                  asm("NOP");
                  if (SLEEPCMD & 0x03)
                  {
                    //Den Sleepmode auslösen
                    PCON |= 0x01;
                    asm("NOP");
                  }

I use Port0 & 1 and also Timer 1 Interrupts. Timer 1 is disabled before going to PM3. The Port 0 and 1 interrupts are used to wake up the µC.

The current measurment is like described here. Only the µC, three Buttons with the internal Pull-ups and the RF Stage, no other peripherals. The board is powerd by a CR2032 directly.

The CCdebugger is disconnected, when I messure.

 The µC needs 300µA in PM3 mode (3mA in normal operation). I meassure also the 1.8V DC at the DCOUPL Pin and if the µC is in sleep mode there are no 1.8VDC and the Crystal is also switched off. So I think the µC is in PM3 or in PM2.

There are no floating pins.

Are there some work in the IAR settings to do? I read somtimes there is something special with debugger (Simulates PM2 and PM3). Is there are setting like: no debug features or final build or something like that?

When I change the source code, so that the µC have to enter PM2, the current measurement is the same...

In the datasheet I read something about the code alignment of the sleep function(swru191e page 63). But it doesn't work in my IAR (Ver. 8.20.2). Have anybody a example that works? I'm new with IAR and assembler.

Have anybody a hint for me? I don't know what to do further.

  • Hi Thomas,

    The 300uA sounds to me like to pins connected to ground that are left in their reset state. All GPIOs except P1.0 and P1.1 have internal 20kOhm pullup. In reset all pins are configured as inputs, and those that have pullup have it enabled. Please investigate your schematic, then decide whether you want to fix your hardware or live with a software fix which would cause a 300uA peak during reset.

  • Hi Torbjorn,

    there are no pins connected to ground. I have only three pins and these are connected to buttons, wich are connected to ground. So all pins are Inputs with pullup enabled. I have one output P1.0 to do an IR signal, but I removed all the parts from the board, so there can't be a power consumption.

  • Hello,

    I tested my code with the same board, but a CC2530 256 and it works. Is there an difference between the two methods to get in sleep mode? I modified the settings from IAR.

    The other chip is a CC2533 with 32kB. I try also to configure the CC2530 256 as a 32kB variant and it also works (because the 256kB is a banked one). Probably I do something wrong with the clocks? I think not because the clocks are disabled in PM3. The CC2533 have some more features, like the special BOD mode and the crystel amplitude control, is there the possibility to need more current in sleep mode?

  • Hi Thomas,

    How are pins 2 and 3 connected? These are ground / NC on CC2530 and I2C on CC2533.

    Cheers,

    Fredrik