Open martinmortsell opened 1 year ago
Having looked at the datasheet the baudrate calculation needs to be done separately for asynchronous modes and synchronous modes. (And for ISO7816, should that ever be implemented.) Furthermore, Baudrate Configuration should be omitted completely for SPI Client as the clock speed is determined by an external chip in that case.
I'm using the Usart peripheral in SPI Mode and it seems like the SCK is running at exactly 8 times the frequency I set it to. E.g.
yields a bitrate of 8MHz. I haven't explored this behaviour fully, but it seems to me that the cause is:
in /usart/mod.rs Compare 46.6.1.1 which is the current behaviour to 46.6.1.3 which is the desired behaviour in SPI Mode.