Skip to main content
Associate II
June 16, 2026
Question

Is STMF411RE proper for the task?

  • June 16, 2026
  • 6 replies
  • 81 views

I posted something the other day; that thread is still open, and I'll close it once I have a solution. I think this information must be out there somewhere because right now it's very limited. 

Here is the thread: CDC HOST


As I said, I have no problem with the development boards, but your reasoning means that I might still end up with the same problem in the end. Let me explain. 

We have 3 chips of the same model but in different packages. This means that the 3 chips have the same functions but a different number of ports.

STM32F411CEU6 (UFQFPN48) / Dev Board: Weact Blackpill. (unofficial) (BlackPill Schematic)
STM32F411RET6 (LQFP 64) / Dev Board: Nucleo-F411RE                       (Nucleo F411 Schematic)
STM32F411VET6 (LQFP 100) / Dev Board: F411-Disco                             (Disco F411 Schematic)

First, I should start by saying that tutorials for HOST/CDC mode are very rare. Usually, the code generated by CubeMX is reliable, and in this case, I was able to test the DEVICE/CDC part without any issues.

In my opinion, I should have no trouble at all with the F411-DISCO, because it’s well documented. With the Nucleo, I might run into some issues since the schematic for the USB connector is different. And for the BlackPill, it’ll probably be a whole different story. 

Now, in the end, I’ll be back with the same problem. When I try to make another custom board, I’ll still need to figure out where my problem is coming from, because the final board will be based on an STM32F411CEU6.

The fun thing about a breadboard is that you build it as you go along and can test it at every step. And in the end, all you have to do is transcribe everything into a PCB editor. With a development board, you’ll be forced to scavenge things without necessarily being able to test everything. So in both cases, you need to know about that little magic box that makes all the difference. 

Now, before I buy a Nucleo-F411RE, is it capable of handling HOST/CDC? I tried a Bluepill (DEVICE) and a Blackpill (HOST), but nothing happened... The DEVICE mode works great. I even tried using the Blackpill in device mode, and that worked fine. The UART part works too... It’s just the HOST.

I don’t want to waste money if I’m just going to end up back at square one. Plus, I might as well switch to the ESP32... but yuck, their suite is Python-based. I’d rather stick with STM32CubeIDE. 

 

 

6 replies

Ozone
Principal
June 16, 2026

> … , because the final board will be based on an STM32F411CEU6.
> … And in the end, all you have to do is transcribe everything into a PCB editor.

As you might have noticed, not all F411 MCUs are created equal.
I had similiar issues porting code from one F303 variant to another.

The CEU6 variant has 48 pins, the VET6 of the discovery board is a 100-pin variant.
As a consequence, the the GPIOs PD5 and PC0 used for the Discovery target USB (OTG) are not even available in your planned design, so Disco code will definitely not work out of the box.
You could check if the USB peripheral is routed to other pins you can use, perhaps the change is minimal. But perhaps it doesn’t work with the CEU6 variant for other reasons, you would need to check both the datasheet and reference manual carefully.
All I can say.

Pavel A.
June 16, 2026

Here you can find competent help for your project.

As for buying Nucleo-F411RE - the board picture shows no user USB port at all, not device neither host.

So you’ll have to add the host connector, provide the USB power supply, with overcurrent protection and so on. Good news is that “OTG” specific signals can be ignored because you want just the host function.

 

Andrew Neil
Super User
June 16, 2026

Nucleo-F411RE - the board picture shows no user USB port at all, not device neither host

Indeed.

 

@Fleuve this was already noted in your other thread

 

Not really sure what was the point of starting a whole separate thread for this ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User
June 16, 2026

I made a CDC host with a xxx-pill board, F401 cpu on it .

Needed for old test machine, has only RS232 keyboard input ; to use a standard USB keyboard here.

So the F401 is adapter USB CDC host → RS232 terminal . 

Just used CubeMX/IDE and HAL lib . 

 

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
FleuveAuthor
Associate II
June 18, 2026

@Andrew Neil

Not really sure what was the point of starting a whole separate thread for this ?

 

To provide support on the host. And on the other hand, to provide the missing information about the missing part of the F411RE. 

The STM411-Disco is all well and good, but did you know that it dates back to 2014 and that some parts are already considered obsolete? Furthermore, pins PA11 and PA12 are not populated. How can I test the new circuit with the new EMI filter? 

I’m not going to buy a Disco just for the code and the ST411RE to test the circuit. My Black Pill might not be genuine, but the chips come directly from the manufacturer’s website. 

 

FleuveAuthor
Associate II
June 18, 2026

@AScha.3 

 

It looks like more than one HID… I tried to trigger the host on my Blackpill, but it doesn't work. Anyway, I'm happy for you. But for me, it's not worth much. No reference, no schematic, no code. Why didn't you reply to the other thread? 

 

FleuveAuthor
Associate II
June 18, 2026

@Ozone ​@Pavel A. 

Yes, I had already seen this in the documentation. (OK, English isn't my native language, so it takes me a few readings to understand it.) And if I understand correctly... D+, D-, VBUS, GND… that’s all we need… I even tried temporarily replacing the switch by plugging it into the 5V line with a resistor, but nothing happened… maybe my setup isn’t right… I find this frustrating, because usually STM code is pretty straightforward. The example online doesn’t seem that special to me. 

CDC Host Examples

 

So I looked over the code in the example, but I couldn't find any references to PD5.

In every case never the host trig  APPLICATION_READY.

I’M gonna order STMPS2141STR and try with.
 

 

 

Ozone
Principal
June 18, 2026

> So I looked over the code in the example, but I couldn't find any references to PD5.

I had just noticed this pin was routed to the target USB interface of the Disco board, but did not dig deeper.

Digging deeper, it is connected to the /FAULT output of the STMPS2141, and thus not directly associated with the USB peripheral. You could use any free GPIO in your application here, I think.
The same goes for PC0 as an enable input (/EN) for the STMPS2141.