cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 program moved to STM32G0 PB3 edge interrupt not running

huzb11
Associate II

//STM32F0 PB3 interrupt part program:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

void EXTI2_3_IRQHandler(void)

{

if((EXTI->PR & ((uint32_t)0x00000008)) != 0)  /* Check line 3 has triggered the IT */

{

printf("EXTI2_3_IRQHandler:PR=%d\r\n",(EXTI->PR & ((uint32_t)0x00000008)));

。。。。。。。。。。。

/* Clear the EXTI line 3 pending bit */

EXTI->PR = ((uint32_t)0x00000008);

//    printf("EXTI2_3_IRQHandler \r\n");

}

 

}

 

void init_zerox_pin(void)

{

GPIO_InitTypeDef GPIO_InitStruct = {0};

 

__HAL_RCC_GPIOB_CLK_ENABLE();

 

  /*Configure GPIO pin : PB3 */

GPIO_InitStruct.Pin = GPIO_PIN_3;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

GPIO_InitStruct.Pull = GPIO_NOPULL;

HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

}

 

 

void config_exti_line3_to_zerox(unsigned char enable_disable)

{

 

/* Enable SYSCFG clock */

RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;

 

/* Connect EXTI3 Line to PB3 pin */

uint32_t tmp = 0x00;

 

tmp = ((uint32_t)0x0F) << (0x04 * (((uint8_t)0x03) & (uint8_t)0x03)); //(uint8_t)0x03):PB3

SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] &= ~tmp;

SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] |= (((uint32_t)((uint8_t)0x01)) << (0x04 * (((uint8_t)0x03) & (uint8_t)0x03)));

 

/* Configure EXTI3 line */

tmp = (uint32_t)EXTI_BASE;

 

if(enable_disable == ENABLE)

{

printf("config_exti_line3:ENABLE\r\n");

/* Clear EXTI line configuration */

EXTI->IMR &= ~((uint32_t)0x00000008);

EXTI->EMR &= ~((uint32_t)0x00000008);

 

tmp += 0x00;

 

*(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

 

/* Clear Rising Falling edge configuration */

EXTI->RTSR &= ~((uint32_t)0x00000008);

EXTI->FTSR &= ~((uint32_t)0x00000008);

 

/* Select the trigger for the selected interrupts */

 

tmp = (uint32_t)EXTI_BASE;

/* falling edge set */

tmp += 0x0C;          //EXTI_FTSR: Address offset: 0x0C

 

*(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

}

else

{ printf("config_exti_line33:DISABLE\r\n");

tmp += 0x00;

 

/* Disable the selected external lines */

*(__IO uint32_t *) tmp &= ~((uint32_t)0x00000008);

}

 

/* Configure NVIC for External Interrupt */

 

/* Enable Interrupt on EXTI2_3 */

NVIC_EnableIRQ(EXTI2_3_IRQn);

 

/* Set priority for EXTI2_3 */

NVIC_SetPriority(EXTI2_3_IRQn,0);

}

 

 

After changing to STM32G0, the program is as follows

 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

 

void EXTI2_3_IRQHandler(void)

{

if((EXTI->FPR1 & ((uint32_t)0x00000008)) != 0)  /* Check line 3 has triggered the IT */

{

printf("EXTI2_3_IRQHandler:FPR1=%d\r\n",(EXTI->FPR1 & ((uint32_t)0x00000008)));

。。。。。。。。。。。

 

 

/* Clear the EXTI line 3 pending bit */

EXTI->FPR1 = ((uint32_t)0x00000008);

//    printf("EXTI2_3_IRQHandler \r\n");

}

else if((EXTI->RPR1 & ((uint32_t)0x00000008)) != 0)

{

printf("EXTI->RPR1 = ((uint32_t)0x00000008)\r\n");

 

EXTI->RPR1 = ((uint32_t)0x00000008);

}

}

 

void init_zerox_pin(void)

{

GPIO_InitTypeDef GPIO_InitStruct = {0};

 

__HAL_RCC_GPIOB_CLK_ENABLE();

 

/*Configure GPIO pin : PB3 */

GPIO_InitStruct.Pin = GPIO_PIN_3;

GPIO_InitStruct.Mode = GPIO_MODE_INPUT;

GPIO_InitStruct.Pull = GPIO_NOPULL;

HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

}

 

 

void config_exti_line3_to_zerox(unsigned char enable_disable)

{

/* Enable SYSCFG clock */

#if 0

RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;

#else

//  RCC->APBENR2 |= RCC_APBENR2_SYSCFGEN;

__HAL_RCC_SYSCFG_CLK_ENABLE();

#endif

 

/* Connect EXTI3 Line to PB3 pin */

uint32_t tmp = 0x00;

 

#if 0

tmp = ((uint32_t)0x0F) << (0x04 * (((uint8_t)0x03) & (uint8_t)0x03));

SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] &= ~tmp;

SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] |= (((uint32_t)((uint8_t)0x01)) << (0x04 * (((uint8_t)0x03) & (uint8_t)0x03)));

#else

tmp = ((uint32_t)0x0F) << (0x08 * (((uint8_t)0x03) & (uint8_t)0x03));

EXTI->EXTICR[((uint8_t)0x03) >> 0x02] &= ~tmp;

EXTI->EXTICR[((uint8_t)0x03) >> 0x02] |= (((uint32_t)((uint8_t)0x01)) << (0x08 * (((uint8_t)0x03) & (uint8_t)0x03)));

#endif

 

/* Configure EXTI3 line */

tmp = (uint32_t)EXTI_BASE;

 

if(enable_disable == ENABLE)

{

printf("config_exti_line3:ENABLE\r\n");

/* Clear EXTI line configuration */

#if 0

EXTI->IMR &= ~((uint32_t)0x00000008);

EXTI->EMR &= ~((uint32_t)0x00000008);

#else

EXTI->IMR1 &= ~((uint32_t)0x00000008);

EXTI->EMR1 &= ~((uint32_t)0x00000008);

#endif

tmp += 0x00;

 

*(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

 

/* Clear Rising Falling edge configuration */

#if 0

EXTI->RTSR &= ~((uint32_t)0x00000008);

EXTI->FTSR &= ~((uint32_t)0x00000008);

#else

EXTI->RTSR1 &= ~((uint32_t)0x00000008);

EXTI->FTSR1 &= ~((uint32_t)0x00000008);

#endif

/* Select the trigger for the selected interrupts */

 

tmp = (uint32_t)EXTI_BASE;

/* falling edge set */

tmp += 0x04; //EXTI_FTSR1:Address offset: 0x04

 

*(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

}

else

{ printf("config_exti_line33:DISABLE\r\n");

tmp += 0x00;

/* Disable the selected external lines */

*(__IO uint32_t *) tmp &= ~((uint32_t)0x00000008);

}

 

/* Configure NVIC for External Interrupt */

 

/* Enable Interrupt on EXTI2_3 */

NVIC_EnableIRQ(EXTI2_3_IRQn);

 

/* Set priority for EXTI2_3 */

NVIC_SetPriority(EXTI2_3_IRQn,0);

}

 

 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

Before the migration, the STM32F030 chip was used, which was driven by early registers, and the program ran normally. When porting this part of the edge interrupt program to STM32G070, it will not run directly. Is it that some register configuration on STM32G070 is not properly configured?

7 REPLIES 7
STTwo-32
ST Employee

Hello @huzb11 and welcome to the ST Community :smiling_face_with_smiling_eyes:.

I suggest you take a look at the AN5145 to understand how to do migration from the STM32F0 family to the STM32G0. 

Best Regards.

STTow-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

hi  STTwo-32:

                      I have reviewed the AN5145 document several times, but there are differences in the interrupt part between the F0 and G0 chips, as shown in the screenshot:

 

huzb11_0-1709195061442.png

But I have modified the program many times for STM32G0, and since there are no routines in this area, it never runs. I have referred to the RM0444 document for the above code. Due to some registers in STM32G0 not being present on stm32f0, I am not sure where the problem lies? Can you help me take a look?

Andreas Bolsch
Lead II

Certainly not the (only) reason for your problem:

#else
tmp = ((uint32_t)0x0F) << (0x08 * (((uint8_t)0x03) & (uint8_t)0x03));

is wrong, as the port selection is now an 8-bit field rather than a 4-bit field. But your code is - from my point of view - rather incomprehensible. It might be a good idea to use something like

/* GPIOA -> 0, GPIOB -> 1, GPIOC -> 2, etc. */
#define PORT_IDX(port) ((port - GPIOA) >> 10)

and then

PORT_IDX(GPIOB)

and something 

#define ExtiPin 3

and then use

(0x1U << ExtiPin)

or maybe even

#define ExtiPinMsk ((0x1U << ExtiPin)

instead of ((uint32_t)0x00000008 throughout etc. All magic constants should be *calculated* from pin number!

Then I'd check first that level change on the pin is indeed detected (by reading GPIOB->IDR) and if this works, compare the exti register contents to the *desired* settings according to RM.

hi  Andreas Bolsch:
                             Because the early code was done by the previous engineer, I took over later and replaced it with the STM32G070 chip instead of wanting to spend a lot of time redoing it all. Now I just want to make some modifications on his basis to make it work. Now, some adjustments have been made, but it still cannot work. What's going on?

                            

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void SYSCFG_EXTILineConfig(uint8_t EXTI_PortSourceGPIOx, uint8_t EXTI_PinSourcex)

{

  uint32_t tmp = 0x00;

  /* Check the parameters */

  assert_param(IS_EXTI_PORT_SOURCE(EXTI_PortSourceGPIOx));

  assert_param(IS_EXTI_PIN_SOURCE(EXTI_PinSourcex));

  tmp = ((uint32_t)0x0F) << (0x08 * (EXTI_PinSourcex & (uint8_t)0x03));

  EXTI->EXTICR[EXTI_PinSourcex >> 0x02] &= ~tmp;

  EXTI->EXTICR[EXTI_PinSourcex >> 0x02] |= (((uint32_t)EXTI_PortSourceGPIOx) << (0x08 * (EXTI_PinSourcex & (uint8_t)0x03)));

}

////////////////////////////////////////////////////////////////////////////////////////

/* Board version X4 */

void config_exti_line3_to_zerox(unsigned char enable_disable)

{

  /* Enable SYSCFG clock */

#if 0 

  RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;

#else

//  RCC->APBENR2 |= RCC_APBENR2_SYSCFGEN;

  __HAL_RCC_SYSCFG_CLK_ENABLE();

#endif

  /* Connect EXTI3 Line to PB3 pin */

  uint32_t tmp = 0x00;

 

//#if 0 

//  tmp = ((uint32_t)0x0F) << (0x04 * (((uint8_t)0x03) & (uint8_t)0x03));

//  SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] &= ~tmp;

//  SYSCFG->EXTICR[((uint8_t)0x03) >> 0x02] |= (((uint32_t)((uint8_t)0x01)) << (0x04 * //(((uint8_t)0x03) & (uint8_t)0x03)));

//#else

//  tmp = ((uint32_t)0x0F) << (0x08 * (((uint8_t)0x03) & (uint8_t)0x03));

//  EXTI->EXTICR[((uint8_t)0x03) >> 0x02] &= ~tmp;

//  EXTI->EXTICR[((uint8_t)0x03) >> 0x02] |= (((uint32_t)((uint8_t)0x01)) << (0x08 * // // //(((uint8_t)0x03) &

// (uint8_t)0x03)));

//#endif 

   SYSCFG_EXTILineConfig(1,3);

   

  /* Configure EXTI3 line */

  tmp = (uint32_t)EXTI_BASE;

 

  if(enable_disable == ENABLE)

  {

    printf("config_exti_line3:ENABLE\r\n");

    /* Clear EXTI line configuration */

#if 0

    EXTI->IMR &= ~((uint32_t)0x00000008);

    EXTI->EMR &= ~((uint32_t)0x00000008);

#else

    EXTI->IMR1 &= ~((uint32_t)0x00000008);

    EXTI->EMR1 &= ~((uint32_t)0x00000008);

#endif   

    tmp += 0x00;

   

    *(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

   

    /* Clear Rising Falling edge configuration */

#if 0

    EXTI->RTSR &= ~((uint32_t)0x00000008);

    EXTI->FTSR &= ~((uint32_t)0x00000008);

#else

    EXTI->RTSR1 &= ~((uint32_t)0x00000008);

    EXTI->FTSR1 &= ~((uint32_t)0x00000008);

#endif

    /* Select the trigger for the selected interrupts */

   

    tmp = (uint32_t)EXTI_BASE;

    /* falling edge set */

    tmp += 0x04; //EXTI_FTSR1:Address offset: 0x04

   

    *(__IO uint32_t *) tmp |= ((uint32_t)0x00000008);

  }

  else

  { printf("config_exti_line33:DISABLE\r\n");

    tmp += 0x00;

    /* Disable the selected external lines */

    *(__IO uint32_t *) tmp &= ~((uint32_t)0x00000008);

  }

  /* Configure NVIC for External Interrupt */

  /* Enable Interrupt on EXTI2_3 */

  NVIC_EnableIRQ(EXTI2_3_IRQn);

  NVIC_SetPriority(EXTI2_3_IRQn,0);

}

Sigh, that's life of a software developer: You get some old code to modify, hunt bugs or port it ... And stumble about something really weird ...

But again: Did you check that different logic levels on PB3 really appear in the IDR? And you're absolutely certain that location 0x40021860 contains 0x01xxxxxxxx ?

huzb11
Associate II

hi  Andreas Bolsch:

    I have read the IDR of STM32G0 PB3, and its value is consistent with the IDR value of STM32F0 PB3 when printed.

///////////////////////////////////////////////////////////////////////////////////

  //The code is as follows:

    uint8_t ZEROX_PIN_STATE_GET(void)
{
uint8_t bitstatus = 0x00;

if ((GPIOB->IDR & (1 << 3)) != 0) 
{
bitstatus = 1;
// printf("33:bitstatus=%d\r\n",bitstatus);
}
else
{
bitstatus = 0;
// printf("44:bitstatus=%d\r\n",bitstatus);
}
// printf("7766:bitstatus=%d\r\n",bitstatus);
return bitstatus;
}

///////////////////////////////////////////////////////////////////////////////////

//The serial port printing is as follows:

 

Boot_Uart_Init_Ok:device_mode=0
MX_USART3_UART_Init:Firmware_version=1,device_mode=0
ac_voltage_get_task11
config_exti_line33:DISABLE
ac_voltage_get_task22
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
error_time_out=200000,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
error_time_out=199999,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
22:acvolt_error_cnt=1,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
error_time_out=200000,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
error_time_out=199999,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
22:acvolt_error_cnt=2,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
error_time_out=200000,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
error_time_out=199999,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
22:acvolt_error_cnt=3,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,ReadPB3=0
error_time_out=200000,ZEROX_PIN_STATE_GET()=1,ReadPB3=1
error_time_out=199999,ZEROX_PIN_STATE_GET()=1,ReadPB3=1

。。。

I have exhausted all my means, I don't know what's going on? PB3 interrupt means it does not run.

hi  Andreas Bolsch:

After STM32070 is powered on, there is no signal input. After PB3 continues for a period of time, what is the reason why IDR keeps having a value? Has it always been alternating between high and low signals? What's going on? And STM32F0, always low signal in the end? How can I make its timing the same as STM32F0?

///////////////////////////////////////////////////////////////////////////////////////////////////////////

STM32G070:

44:error_time_out=199999,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=253,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=1,PB3=1
11:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
22:error_time_out=199999,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=254,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,PB3=0
11:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
11:error_time_out=199999,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
44:error_time_out=199999,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=255,ZEROX_PIN_STATE_GET()=0,PB3=0
acvolt_error_cnt55=255
config_exti_line3:ENABLE
relay_state_get_task
frequency_get_task
frequency_get_task00:Frequency_get_required_G=0,Falling_edge_get_required_G=1
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task

.......

 

////////////////////////////////////////////////////////////////////////////

stm32F0:

11:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=251,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=0,PB3=0
11:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
44:error_time_out=199999,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=252,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
44:error_time_out=199999,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=253,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
22:error_time_out=199999,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=254,ZEROX_PIN_STATE_GET()=0,PB3=0
00:get_acvolt_cnt=0,ZEROX_PIN_STATE_GET()=1,PB3=1
11:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:error_time_out=200000,ZEROX_PIN_STATE_GET()=0,PB3=0
44:error_time_out=200000,ZEROX_PIN_STATE_GET()=1,PB3=1
22:acvolt_error_cnt=255,ZEROX_PIN_STATE_GET()=0,PB3=0
config_exti_line3:ENABLE
relay_state_get_task
frequency_get_task
frequency_get_task00:Frequency_get_required_G=0,Falling_edge_get_required_G=1
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
falling_edge_get66:Falling_edge_cnt_G=0,Frequency_get_required_G=1
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
falling_edge_get66:Falling_edge_cnt_G=0,Frequency_get_required_G=1
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=0
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
falling_edge_get66:Falling_edge_cnt_G=0,Frequency_get_required_G=1
relay_state_get_task
frequency_get_task
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_state_get_task
frequency_get_task
-->>>system_mode_update000:Frequency_get_required_G=0,Falling_edge_get_required_G=0
system_mode_update22
system_mode_update55:_g_stop_ble_adv=1,zerox_calibrated=0
GET_UNIT_STATE_MODE=1,PB3_IDR=8
relay_on1
relay_on
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
55:RELAY_Flag[ RELAY_CURRENT_STATE ]=0,Relay_operate_delay_required_G=1
--->relay_operate_delay22
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0
EXTI2_3_IRQHandler:PR=8,PB3_IDR=0