-
Notifications
You must be signed in to change notification settings - Fork 1k
Serial print hangs - discovery stm32f4 #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The code posted above works for me on an STM32F407G-DISC1 board. Here's the first few lines of output:
That being said, after an upload the board does appear to hang sometimes and it's necessary to hit the reset button in order to get it to work. |
Hi @MauroMombelli For my test I've connected another STLink form a Nucleo 64 to get the VCP. |
@fivdi ill try again the reset but pretty sure i did it. arduino ide 1.8.5, using default STM32F407G-DISC1 over stlink, serial set to "Generic"
uhmm interesting, could i have hit some case where this could be reproducible? would be helpful to upload the binary?
that is something i did not think of |
What do you mean by that? the default arduino arm gcc 4.8.3 ?
And by this? you mean core version? |
yes
yes, core 1.2.0 works, 1.3.0 don't. i only updatetd the core and reuploaded the script. but now im facing another issue, any code uploaded with arduino "break" the chip, i need to reboot it with boot0 HIGH and unlock the flash (not sure the unlock step is necessary), so probably something broke in the ide while switching cores (i did all that switching from board manager) |
This core is no more compatible with 4.8.3 since a while. So I do not understand how you could use it... The platform.txt specifies the arm gcc toolchain version to use to avoid issue with another core using also arm gcc toolchain:
This looks really strange you used the 4.8.3 version Switching from the board managers should work fine, basically it remove all related stuff and extract the new one. When user met issue, it is often because he made some manual actions. (ex: using git repo,...). What I can advise is to start from a clean Arduino installation. |
Hi @MauroMombelli, |
Might not be related but I was recently fiddling with my blue pills and found that I needed a delay(X); after the Serial.begin(...); As best I could determine the value of X lies between 200 and 300 millisec. Since 300 works everytime that's what I use in my STM32F103C8 sketches. |
Hi @BNNorman |
Interesting - I'm not using the USB connector on the Blue Pill - I use an FTDI cable with RX/TX connected to PA9 and PA10 and Serial.begin() works fine apart from a delay needed. After trying to get the Arduino IDE to use the USB for sketch uploading and the Serial Monitor I gave up because it was such a faff on a Windows PC with DFU device not being recognised. To use the Serial Monitor with the USB port, in the past, I had to instantiate a USBSerial object. I'm no expert on this so I welcome any input. |
Have you look on stm32duino.com which is the primary place for support. Here this is the place for issue with Arduino_Core_STM32 not Arduino_STM32. |
Close it as no user feedback. |
The following code (a modified version of ascii table to include a blink to a led) will 100% hang without any output to serial at the first Serial.print().
Works fine on 1.2.0
The text was updated successfully, but these errors were encountered: