Reply
Posts: 2
Registered: ‎03-15-2017

EM4 on Flex Gecko

hi,

I am trying to put the flex gecko into em4, but it seems the device wakes up immediately.

The power output looks like that:

 

ScreenShot.jpg

 

I am using the following code, please give me a hint:

int main(void)
{
  CHIP_Init();
  halInit();
  CMU_ClockEnable(cmuClock_GPIO, true);
  BSP_Init( BSP_INIT_BCC );
  
  RAIL_RfIdle(); 
  gpioDisablePins(gpioModeDisabled, 0);
  disableClocks();
  EMU_EM4Init_TypeDef em4Init = EMU_EM4INIT_DEFAULT;
  em4Init.em4State = emuEM4Shutoff;
  EMU_EM4Init(&em4Init);
  EMU_EnterEM4S();
Posts: 270
Registered: ‎03-03-2015

Re: EM4 on Flex Gecko

Hi JulianR,

 

How are you intending to wake up from EM4?  Are you using the BURTC?  The GPIO pins?  Could one of these things be triggering the reset?

 

Regards,

Joe

Posts: 2
Registered: ‎03-15-2017

Re: EM4 on Flex Gecko

I worry about waking up later. I am not using BURTC and the GPIO Pins get disabled with gpioDisablePins(gpioModeDisabled, 0);

 

void gpioDisablePins(uint32_t mode,uint32_t level)
{
  for (int i = 0; i<15; i++)
  {
    GPIO_PinModeSet(gpioPortA, i,  mode, level);
    GPIO_PinModeSet(gpioPortB, i,  mode, level);
    GPIO_PinModeSet(gpioPortC, i,  mode, level);
    GPIO_PinModeSet(gpioPortD, i,  mode, level);
    GPIO_PinModeSet(gpioPortF, i,  mode, level);
  }
}

 

Posts: 10
Registered: ‎09-25-2016

Re: EM4 on Flex Gecko

Flex Gecko has no BURTC.   You can use RTCC.

It's a hardware bug as I know.

Have the new rivison of chip resolve the problem?