cancel
Showing results for 
Search instead for 
Did you mean: 

STOPmode not wakeup when code generated CubeMX 5.6. Same code 5.4 work ok.???

MM..1
Chief II

main.cpp from 5.4

 //turned off wait on

 while (1)

 {

 HAL_Delay(1);

HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

if (HAL_GPIO_ReadPin(SW_PWR_GPIO_Port, SW_PWR_Pin) == GPIO_PIN_RESET ||

HAL_GPIO_ReadPin(TRIGER_IN_GPIO_Port, TRIGER_IN_Pin) == GPIO_PIN_RESET)

  {

   break;

  }

....

}

main.c same code from 5.6 dont wake with same exti.

MX_GPIO_Init(void) is identical.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

Finaly solved moving MX_TouchGFX_Init(); to place after stop mode as in 5.4 code. This is strange seems this init disables irqs or?

And in CubeMX config cannot by disabled generating call to this init before user code part. When i disable it checkbox is ignored and cleared when generating code.

View solution in original post

2 REPLIES 2
MM..1
Chief II

Nobody?

I see only two diference first is C vs C++ second when i read list file assembler generated by compilers have big difference.

Next one diff is in 5.6 code is called MX_TouchGFX_Init();

before this while stop mode , but i mean this isnt problem source.

MM..1
Chief II

Finaly solved moving MX_TouchGFX_Init(); to place after stop mode as in 5.4 code. This is strange seems this init disables irqs or?

And in CubeMX config cannot by disabled generating call to this init before user code part. When i disable it checkbox is ignored and cleared when generating code.