while working on a custom .NET MF port to a custom board with STM32F4, I have run into a need to change the MCU’s USB peripheral being used by TinyBooter to communicate with the host PC&MFDeploy.
The original port from Oberon, Inc. (http://netmf4stm32.codeplex.com/) and all the other ports, including the FEZCerberus_Community use the USB_OTG_FS peripheral (pins PA11 and PA2). In my case, I would like to switch it to the USB_OTG_HS peripheral (MCU pins PB14 and PB15). The MCU being used is STM32F407ZG.
My source code is based on the original .NET MF PK 4.2 source linked above, but it is not much different from the above-mentioned FEZCerberus_Community port 4.3 when it comes to the files and data structures described below.
I tried to change the following defines in platform_selector.h from USB1 to USB2, however with no effect. The tinybooter still communicates with PC via USB_OTG_FS.
#define DEBUG_TEXT_PORT USB2 #define STDIO USB2 #define DEBUGGER_PORT USB2 #define MESSAGING_PORT USB2
What I traced so far, the constants get propagated and they get to the
file to the global variable HalSystemConfig. The HalSystemConfig structure is then used by various parts of the .NET MF – the Application/TinyBooter/TinyBooter.cpp seems important for my case. There I got stuck a bit with deciphering what happens next.
Could you hint me where to look next in order to make the USB working? Thank you for any help.