November 22, 2024, 02:45:20 PM

Using USB host and device port on STM32-H407

Started by olm407john, October 01, 2018, 06:43:04 PM

Previous topic - Next topic

olm407john

Hello,

Does STM32-H407 board support simultaneous use of USB host port (connected to keyboard with touchpad) and microusb OTG port as device port connecting to PC? I am not a hardware expert, but looking at the schematic leads me to believe that they are connected to different pins on the MCU.

https://www.olimex.com/Products/ARM/ST/STM32-H407/resources/STM32-H407_Rev_B_sch.pdf

I plan to download firmware via Olimex JTAG adapter to the board use virtual com port as console.

Googling around does not give me any hits if others have done any projects, so any links would be much appreciated!

Thanks much in advance

LubOlimex

> Does STM32-H407 board support simultaneous use of USB host port (connected to keyboard with touchpad) and microusb OTG port as device port connecting to PC? I am not a hardware expert, but looking at the schematic leads me to believe that they are connected to different pins on the MCU.

Yes, you can use the HOST and OTG at the same time.

> I plan to download firmware via Olimex JTAG adapter to the board use virtual com port as console.

Sounds like a good plan.

> Googling around does not give me any hits if others have done any projects, so any links would be much appreciated!

You don't have to search for examples exactly for this board you can also check for STM32-E407 or STM32-P407 - the USB examples would be similar. Furthermore, the STM32F407 chip is very popular and most USB-related examples and libraries made for other boards with the same chip would also work with the STM32-H407 board. Some slight code edits might be required (like changing the declaration of the pins).
Technical support and documentation manager at Olimex

olm407john

@LubOlimex: Thanks much for your confirmation.

Would you be able to comment on the BSP package for H407, i.e, how different is it from the STM32F4 Discovery board? It looks like Rowley IDE has BSP for H407, and since I use Keil+STM32CubbeMX for Discovery board, I was wondering what changes would be needed to make the STM32F4 BSP work on H407? Any insights would help me to grasp the scope of differences.

Thanks again.

LubOlimex

As I mentioned USB examples for the discovery board in Keil software can be used as a basis. Getting these examples work would be easier than porting a Rowley project to Keil software.

Once you encounter specific problems in the process, it might be a good idea to ask in the Keil forums. 
Technical support and documentation manager at Olimex