cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Boards and USB Host issue

Pablo Leibovich
Associate II

Hi,

I'm trying to make a simple USB host for MSC devices. I'm working with a STM32F429 NUCLEO-F429ZI board and a STM32F407 STM32F407G-DISC1 boards.

The matter is that both boards have USB power switches wih oppostie logic. That is, the Nucleo boards has a STMPS2151STR which is active high, and the Discovery board has a STMPS2141STR which is active low.

When I configure the code with the STM32Cube MX in the IDE, I can't find any option to configure the active level of the board, so I have to change it manually (after searching for a long time) in the MX_DriverVbusFS of the usbh_platform.c file.

Is there a better solution for it?

Thanks!

1 REPLY 1

You can distinguish 'F429 from 'F407 by reading/checking the DBGMCU_IDCODE register.

JW