GPIO interrups every system tick
Hi all,
I am using F303re to control an e-bike motor. I use GPIO PA6 connected to a speed sensor located on the wheel of e-bike.
Every time the wheel takes a loop, an interrupt is sent from the speed sensor.
Below is GPIO setting:
GPIO_InitStruct.Pin = Speed_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(Speed_GPIO_Port, &GPIO_InitStruct);
My problem is that sometimes when e-bike motor is running, I get interrupts every system tick (1 ms).
I tried to connect this PA6 GPIO pin to a 3.3V VDD, which I expect no interrupts would incoming, but surprisingly there are still interrupts.
Does anyone meet this problem before? Or some clues?
Thank you.
Alex