Post Reply
Posts: 1
Joined: Sun Aug 23, 2020 3:07 pm


Post by joric »

Hi! I'm making kind of funny project here:

* https://github.com/joric/ts80player

Managed to run both Arduno platforms:

* https://github.com/stm32duino/Arduino_Core_STM32 (I call it STM32duino, is it a proper naming?)
* https://github.com/rogerclarkmelbourne/Arduino_STM32 (this one by Roger Clark I just call it Arduino_STM32)

I'm mostly using the latter because there are more PWM examples in the wild and it builds much faster.

The issue is I can't make USB mass storage run without external crystal (HSE). Miniware has not fitted a crystal in any of their irons.

In the same time, the very same hardware runs USB bootloader just perfectly (I upload hex files made in Arduino IDE via USB). Also the very same mass storage example runs just fine on Bluepill that has external crystal I just change Nucleo configuration to "w/crystal".


* TS80 has no HSE, uses "Nucleo F103 at 64 MHz" - can't run USB mass storage example (Device Descriptor Request Failed)
* Bluepill has HSE, uses "Nucleo F103 at 72 MHz w/ crystal" - runs USB mass storage example perfectly

Does anyone have any idea how to fix USBComposite library or boards_setup.cpp and set timings properly so USB could work without HSE? I know it needs 48 Mhz to work but there's no 1/3 divider. USB bootloader still works somehow.


* https://github.com/joric/ts80player/wiki/Arduino_STM32
* https://github.com/rogerclarkmelbourne/ ... boards.txt
* https://github.com/rogerclarkmelbourne/ ... _setup.cpp
* https://github.com/rogerclarkmelbourne/ ... s/mass.ino

Upd. I've used f_cpu=48000000L, BOARD_RCC_PLLMUL RCC_PLLMUL_12 and RCC_USB_SYSCLK_DIV_1 and it works!
Post Reply

Return to “Let us know a bit about you and your projects”