You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • @user53771 yes, you're right - the F103 can only get the SPI clock right to +/- 50%.

    You should be able to change the clock using peek32 and poke32 functions, but USB on the F103 is really picky, so you probably wouldn't be able to keep that going.

    It looks like USART would be fine though - just set it up again with Serial1.setup and it'll use the updated clock speeds. You may find that getTime() behaves strangely afterwards though - it depends which board you're using.

    As you say the other option is to do it at compile time. I'm not sure that changing the clock speed in the .py file will be good enough - you may also need to change this file. But after that it should work.

About

Avatar for Gordon @Gordon started