summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-05-15 11:19:21 +1000
committerDamien George <damien@micropython.org>2024-05-15 15:32:41 +1000
commita0d4fdcce0aa332770065707a63be6b9b1aa1617 (patch)
treea7bafeb744a86b88aff63d4bec1aa47723cf530c /py
parent47ae73940983caa2d109e7c4e5192db8294748f2 (diff)
stm32/pyb_can: Fix STM32G4 FDCAN source clock frequency.
Fixes automatic baudrate calculation results. Default clock source on this SoC is HSE not PCLK1. We could fix this by switching to PCLK1 instead, but two extra complications: - PCLK1 on this board is a 42.5MHz and the Pyboard CAN sample_point calculation requires an exact match, which is harder to hit with this source frequency. - Would be a breaking change for any existing Python code on this board, i.e. specifying brp, bs1, bs2 to initialise CAN. In the future it might be worth looking switching to the PLL source on this SoC instead, as this is a much higher frequency that would give higher quality BRS bitrate matches (probably too high without using the second divider going into the CAN peripheral though, so more code changes needed also). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'py')
0 files changed, 0 insertions, 0 deletions