[solved] USB on Black F407VET6 problem (STM core 1.05)

electrobling
Mon Mar 04, 2019 5:29 pm
I want to use the VCP that should be available on the USB connector of the Black VET6 http://wiki.stm32duino.com/index.php?title=STM32F407. I have Arduino IDE 1.8.8 and STM core 1.05 installed. My initial project was to simply load and run the supplied RTC test sketch. I did that successfully several months ago, but I used USART connections for it back then (edit – and the Maple derived core, not STM though…). I saw references to the VCP and decided it was too good to pass up, as the computer could supply both power and serial communications through the USB port. I am using an ST-LINK device for uploads – I don’t really need DFU although it would be nice.

First I saw that the Windows VCP drivers on the ST website are deprecated for Windows 10, so I didn’t use those. I’m not sure which serial instance to use in my sketch so I tried Serial, Serial1, and an instance of USBSerial. I get a notification “blurp” from the PC but no VCP driver is ever installed. I tried on another computer and it attempted to load a driver and failed with a non-helpful Windows error message that simply advised me that the driver had failed to install.

I decided to simplify things and just load a blink sketch. With this, it will run when connected to a USB charger, but not computer USB. It also launches an attempt to load a driver, which always fails. Along with that, I can see that the sketch is not running because the LEDs are not blinking.

Am I missing something (probably), or is something in STM core 1.05 not quite complete?


BennehBoy
Mon Mar 04, 2019 6:23 pm
How do you have the jumpers set on the board? You need to make sure BOOT0 & BOOT1 are both jumpered to ground.

I can confirm this works, I was doing some testing with a Black407VET6 & 1.5.0 yesterday.


ag123
Mon Mar 04, 2019 7:34 pm
if you are using libmaple core and want to use the serial comm port normally SERIAL_USB needs to be defined, normally it is.
and normally usb serial is SerialUSB. remember to issue SerialUSB.begin(0); in setup(), note that is still usb-serial.
and you can try SerialUSB.println(“hello world”);
use a terminal program, i think that in Arduino IDE should work.

if usb serial initialise, windows would enumerate the usb ports and normally prompt that there is a new usb device and install the drivers for it.
that driver install has to happen if the driver don’t install it you don’t get usb serial. you may want to try st’s drivers if that helps
for linux it is all built-in

dfu is a different thing, to use dfu set boot0 (it is stm’s own dfu boot loader) and review the thread on f407vet black board.
and if you do not want dfu, make sure boot0 is not set

and oh yes, you are using a ‘raw’ board there is ‘nothing’ before your sketch, your app installs at 0x8000,000 unlike with maple mini / blue pill.
check things like the correct ld script is used. stm32duino libmaple core runs pretty much ‘bare metal’ on f4, you may also want to check out the other cores e.g. stm’s core or stm32 generic, the features would vary


fpiSTM
Mon Mar 04, 2019 8:30 pm
Normally the default windows VCP driver is enough.

BennehBoy
Mon Mar 04, 2019 8:33 pm
[ag123 – Mon Mar 04, 2019 7:34 pm] –
if you are using libmaple core

He’s using the STM core. I assume 1.50 and not 1.05 :D

Depending on what menu options were selected either there will be no serial enabled, SerialUSB or, Serial.

It would be worth showing a screenshot of the Tools menu.


electrobling
Mon Mar 04, 2019 8:38 pm
[BennehBoy – Mon Mar 04, 2019 6:23 pm] –
How do you have the jumpers set on the board? You need to make sure BOOT0 & BOOT1 are both jumpered to ground.
I can confirm this works, I was doing some testing with a Black407VET6 & 1.5.0 yesterday.

Yes, both jumpers are configured to ground. I am using the Generic F407VET6 board profile in the IDE Tools menu (as suggested in the ST docs). I also have “USB Serial (CDC)” selected there. Also I have tried with two different boards of the same type, and two different USB cables.


BennehBoy
Mon Mar 04, 2019 9:04 pm
Menu should look something like the attached.

Can you install USBDeview and see what the board is enumerating as?


electrobling
Mon Mar 04, 2019 9:20 pm
FWIW, here is what I have, while I check out USBDeview…

Untitled.png
Untitled.png (12.96 KiB) Viewed 175 times

BennehBoy
Mon Mar 04, 2019 9:32 pm
The option you have selected is from Roger’s core, It’s not STM’s. I’m not sure of the state of CDC with that core, I think it works but you may be missing a driver.

electrobling
Mon Mar 04, 2019 9:50 pm
Okay now that I have the right core, the USB works, thanks! Also the blink example works without freezing. I haven’t tried the serial yet, but I’ll assume it works and I will confirm that tonight. But I thought the RTC was available for F4 in 1.50, is that just wishful thinking on my part? With the F4 selected, I don’t see any RTC examples. I can also dig into the source code tonight.

BennehBoy
Mon Mar 04, 2019 9:56 pm
You should be able to add the STM32duino RTC library from the library manager, you should then get some examples…

Leave a Reply

Your email address will not be published. Required fields are marked *