change clock soure
I need to use HSI for STM32F103R mcu. Please suggest how to do this.
You need to use the define: -DUSE_HSI_CLOCK
You can add such line for your variant in boards.txt:
https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/d05a1289f1e2eaa5127a4bfed9602e2cd48c6ffe/STM32F1/boards.txt#L402
I added the line .. ...but still mcu is not running...
genericSTM32F103R.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB) genericSTM32F103R.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L genericSTM32F103R.menu.cpu_speed.speed_hsi_48mhz.build.hs_flag=-DUSE_HSI_CLOCK
I am selecting STM32F103RB (20k RAM.128kFLASH) in Arduino --> Variant
Problem solved. hsi is working now.
On Wed, May 29, 2024, 12:12 stevstrong @.***> wrote:
You need to use the define: -DUSE_HSI_CLOCK You can add such line for your variant in boards.txt:
https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/d05a1289f1e2eaa5127a4bfed9602e2cd48c6ffe/STM32F1/boards.txt#L402
— Reply to this email directly, view it on GitHub https://github.com/rogerclarkmelbourne/Arduino_STM32/issues/931#issuecomment-2136653109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ7OAUWXYCWSMN4ZQ7BURSTZEV2G7AVCNFSM6AAAAABIOFZIZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWGY2TGMJQHE . You are receiving this because you authored the thread.Message ID: @.***>
Glad to hear that. Can you please share the solution with us?
I added the line as you instructed. There was type mistake in added line so it was not working. But somehow UART is not working if I use HSI..
Close as solved.