STM32H750 - USB CDC not working from System Bootloader - need to clear IABR ?
I'm using the STM32H750. Using the discovery kit I developed a system that always boots into the system bootloader. When I start the application code using a dfu-util, the application code starts a USB FS CDC device and I can communicate with it as virtual serial port. All good.
I'm now trying to do the same thing on our own PCB using the 100pin version of the STM32750. If I run from the debugger, the virtual serial port works perfectly. If I start the application from the system bootloader it fails. When I look at the registers it appears that the bootloader in the discovery kit CPU cleans up properly before calling the application whereas the one in the 100pin device does not. Could that be true? How can I check the version?
When I try to debug the application (started from the bootloader) I can see it hanging in a HAL_Delay() call. The system tick interrupt is never executing. If I disable the OTG_FS_IRQn then I can get the code to run (not hang) but the VCP doesn't actually work.
I think the VCP code is failing to work because when the application starts the OTG_FS_IRQn is currently active (IABR3 = 0x20). Clearing / Disabling interrupts doesn't fix it.
Any ideas? How can I trick the CPU into clearing the OTG_FS_IRQn interrupt active bit? Would I need to do a dummy return from exception? Any ideas how?
Any help welcome,
Ian.
