Good for STS_R1D, 27uA Release to MFG

This commit is contained in:
Yunhorn 2024-05-27 11:19:27 +08:00
parent e2ebd93596
commit 8675b7f447
6 changed files with 10722 additions and 5362 deletions

View File

@ -81,13 +81,14 @@ const struct UTIL_LPM_Driver_s UTIL_PowerDriver =
void PWR_EnterOffMode(void) void PWR_EnterOffMode(void)
{ {
/* USER CODE BEGIN EnterOffMode_1 */ /* USER CODE BEGIN EnterOffMode_1 */
#if 0 #if 1
PME_OFF; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All&(~GPIO_PIN_9), GPIO_PIN_RESET);
HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All&(~GPIO_PIN_5)&(~GPIO_PIN_3)&(~GPIO_PIN_4), GPIO_PIN_RESET);
HAL_GPIO_DeInit(GPIOB,GPIO_PIN_All); HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET);
HAL_GPIO_DeInit(GPIOC,GPIO_PIN_All);
HAL_SuspendTick(); HAL_SuspendTick();
HAL_PWR_EnterSTANDBYMode(); LL_PWR_ClearFlag_C1STOP_C1STB();
HAL_PWR_EnterSTANDBYMode();
#endif #endif
/* USER CODE END EnterOffMode_1 */ /* USER CODE END EnterOffMode_1 */
} }
@ -95,7 +96,7 @@ void PWR_EnterOffMode(void)
void PWR_ExitOffMode(void) void PWR_ExitOffMode(void)
{ {
/* USER CODE BEGIN ExitOffMode_1 */ /* USER CODE BEGIN ExitOffMode_1 */
#if 0 #if 1
HAL_ResumeTick(); HAL_ResumeTick();
return; return;
#endif #endif
@ -105,10 +106,9 @@ void PWR_ExitOffMode(void)
void PWR_EnterStopMode(void) void PWR_EnterStopMode(void)
{ {
/* USER CODE BEGIN EnterStopMode_1 */ /* USER CODE BEGIN EnterStopMode_1 */
PME_OFF; //WORKABLE CONFIG
//HAL_GPIO_DeInit(GPIOA,GPIO_PIN_All); // error bug here HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All&(~GPIO_PIN_9), GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET);// error bug here HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All&(~GPIO_PIN_5)&(~GPIO_PIN_3)&(~GPIO_PIN_4), GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOC, GPIO_PIN_All, GPIO_PIN_RESET);
/* USER CODE END EnterStopMode_1 */ /* USER CODE END EnterStopMode_1 */

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff