Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 943 Bytes

README.md

File metadata and controls

5 lines (4 loc) · 943 Bytes

Wheel Speed Encoder

This C program is designed for the STM32 F103C8T6 and focuses on handling a wheel rotation sensor and transmitting the wheel speed over the Controller Area Network (CAN) communication protocol. The main function sets up the system clock, initializes GPIOs, and configures the CAN peripheral. An interrupt callback function HAL_GPIO_EXTI_Callback is used to calculate the wheel speed based on the time interval between two consecutive rotations of the wheel which is done by using the intervals between the positive rising edges of the sensor. The wheel speed data is then transmitted over the CAN bus using HAL_CAN_AddTxMessage in an infinite loop, with a 1-second delay between transmissions.

image image