AnsweredAssumed Answered

STM32F7 frequency capture on NUCLEO_F746ZG problems...

Question asked by Ed Sutter on May 17, 2018
Latest reply on May 18, 2018 by Ed Sutter

Hi, I am working with STM32Cube_FW_F7_V1.11.0 on a Nucleo_F746ZG.

Seems like what I wanna do should be simple, but I'm not getting it...

I need to measure the frequency of something, so I started with Projects/STM32F746ZG-Nucleo/Examples/TIM/TIM_InputCapture.  This uses TIM3 on GPIOB-Pin5 as the input capture pin.


To test, I just wanted to see the interrupt handler get hit if I pulsed that pin, but I noticed that as soon

as I momentarily ground that pin the board hangs.  Looking at the HAL_TIM_IC_MspInit() function that

comes with the example...


void HAL_TIM_IC_MspInit(TIM_HandleTypeDef *htim)
       GPIO_InitTypeDef GPIO_InitStruct;






GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Alternate = TIMx_GPIO_AF_TIMx;


HAL_NVIC_SetPriority(TIMx_IRQn, 0, 1);



This is straight out of Cube (with comments removed).

It seems odd that an input pin would be configured as push-pull (GPIO_MODE_AF_PP)...

Does anyone know if this is tested code?  If it is, any suggestions as to why

it hangs for me?