Question
HAL_GPIO_EXTI_Callback - using rising edge and falling edge
I use it to see if R S T is present in 3-phase systems with F072 c8t6 processor. I have defined only R pin as interrupt, the other two are defined as input. When I write the code as below, I cannot check the status of R. I guess it is because of the version or the processor I cannot use HAL_GPIO_EXTI_Rising_Callback
CODE:
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
sPhase_t *rstPhase = &taskPeripheralUnits.phase;
if(GPIO_Pin == ioR_Pin)
{
if (HAL_GPIO_ReadPin(ioR_GPIO_Port, ioR_Pin))
{
rstPhase->ucRawPhaseData[ZERO][rstFACTOR_R_PHASE] = ACTIVE;
rstPhase->ucRawPhaseData[ZERO][rstFACTOR_S_PHASE] = HAL_GPIO_ReadPin(ioS_GPIO_Port, ioS_Pin);
rstPhase->ucRawPhaseData[ZERO][rstFACTOR_T_PHASE] = HAL_GPIO_ReadPin(ioT_GPIO_Port, ioT_Pin);
}
else
{
rstPhase->ucRawPhaseData[1u][rstFACTOR_R_PHASE] = PASSIVE;
stPhase->ucRawPhaseData[1u][rstFACTOR_S_PHASE] = HAL_GPIO_ReadPin(ioS_GPIO_Port, ioS_Pin);
rstPhase->ucRawPhaseData[1u][rstFACTOR_T_PHASE] = HAL_GPIO_ReadPin(ioT_GPIO_Port, ioT_Pin);
}
}
}
