I2C: the baudrate seems to be capped. #12748
-
So here is the thing, the baudrate seems to be capped at MicroPython v1.22.0-preview.32.g86c7b957a.dirty on 2023-10-20; NUCLEO-F446RE with STM32F446xx
Type "help()" for more information.
>>> pyb.info()
ID=35001700:03503441:39363120
DEVID=0x0421
REVID=0x1000
S=168000000
H=168000000
P1=42000000
P2=84000000
_etext=806683c
_sidata=8066844
_sdata=20000000
_edata=20000034
_sbss=20000034
_ebss=20000ba8
_sstack=20017ff8
_estack=2001bff8
_ram_start=20000000
_heap_start=20000ba8
_heap_end=20017ff8
_ram_end=2001c000
qstr:
n_pool=2
n_qstr=24
n_str_data_bytes=236
n_total_bytes=716
GC:
93120 total
7968 : 85152
1=147 2=23 m=40
LFS free: 95744 bytes
>>> i2c = pyb.I2C(1, baudrate=1000000)
>>> print(i2c)
I2C(1, I2C.CONTROLLER, baudrate=336000)
>>> |
Beta Was this translation helpful? Give feedback.
Answered by
nspsck
Oct 21, 2023
Replies: 1 comment 2 replies
-
After some digging it came across to me, that the maximum of 400KHz is only achievable when |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nspsck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After some digging it came across to me, that the maximum of 400KHz is only achievable when
PLCK1
is a multiple of 10MHz. Which means, it's impossible to get, if we want a clock frequency of a multiple of 48MHz for the sake of the USB connection. (I am aware that this is not a very detailed argument and it can well be wrong.)