2024-01-06 01:45 PM - edited 2024-01-07 06:14 AM
Hello,
With STM32F411E-DISCO, I am trying to obtain the RPM value by receiving data from the hall sensor of the BLDC motor. For this, I activated XOR On / HALL EFFECT Mode and connected the pins of the hall sensors to the relevant places.
HAL_TIMEx_HallSensor_Start(&htim2);
hall_out = (int32_t)htim2.Instance->CCR1
However, the data varies too much. I cannot get a constant or meaningful output, it can be 4000 at one moment and 2 at another.
There is also a digital output pin on the ESC that can output from hall sensors, but I have not been able to read data from it.
Can you help me a little bit about this? I've scoured the internet almost completely but I can't find an example or anything that can help and I'm a rookie in this subject.