Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the datasheet section 22.7.7 linked below, the number of clock cycles for a single bit is 1 + (TS1[3:0] + 1) + (TS2[2:0] + 1). Using the previous values of 12 and 3 for TS1 and TS2 respectively, this lead to a bit length of 18 clock cycles. With a BRP value of 15 for a prescaler of 16 to achieve a bitrate of 125kbit/s, the bit length would be 1/32 us * (18) * (16), leading to a bit length of 9 us instead of the targeted 8 us. With the values of 11 and 2 for TS1 and TS2 instead, the bit length is 1/32 us * 16 * 16 which corresponds with the correct bit length of 8us, while still having an 80% sample point.
https://www.keil.com/dd/docs/datashts/st/stm32f10xxx.pdf