2020-03-24 07:55 PM
Hello everyone, when debugging, we found that the input capture return value of ll library is different from that of standard library. Ll library forces the return value to 32-bit, which is originally only 16 bit, as mentioned above
Capturedvalue (between min? Data = 0 and max? Data = 65535), but it's still 32-bit. If you don't understand, the standard library doesn't have this way, and it returns directly,
LL Library
Standard library
I hope you can help me, thank you!
2020-03-24 08:08 PM
It should be 32 bits, otherwise 32-bit timers are not going to return the correct value. If you want it as a uint16_t, just make it one.
2020-03-24 08:13 PM
Oh, it's for compatibility, right? The maximum timer capture is uint16_t. I can convert it to uint16_t,thank you!
2020-03-25 03:09 AM
At the time the standard peripheral library for the STM32F1 series was introduced, there were no STM32 MCUs with 32 bit timers.
When ST has introduced HAL, there were already some MCUs with 32 bit timers around.