Hello there.
I use a AS5047 (AS5047P | ams) to perform a motion contol using quadratic encoder signals.
I usualy do this with a 446RE (and it works well), but we have switched to a 429ZI and I experience an issue with timer 4 connected to PD_12, PD_13, while still working well on TIM3 using PB_4 - PB_5.
Signal can be seen with a scope on the pins, but timer fail to return me any value.
I use this library (Encoder_Nucleo_16_bits - 32bits encoder counter using 16bits TIM and a 32b… | Mbed) a bit modified to match pinout (ie : using PD_12 and PD_13 instead of PB_6, PB_7) by using this code :
else if (htim->Instance == TIM4) { // PD12 - PD13
__TIM4_CLK_ENABLE();
__GPIOD_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_12 | GPIO_PIN_13;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
}
But it fails to give me results.
@jeromecoutant : any idea ?