2019-12-18 03:26 AM
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.
2019-12-18 04:12 AM
Ok, I can confirm that the BGA and QFP package sizes of the H750 device have different bootloaders.
The bootloader ID is stored at 0x1ff1e7fe. On the discovery board (BGA) the ID = 0x90 and on our board (QFP) it is 0xD2.
The 'D' part means only USART, DFU, I2C and SPI supported. But the '2' part is the version number. It seems the two package sizes have different bootloader version numbers and they obviously behave differently when exiting the DFU.
I can't change the bootloader so I need a workaround. Clearing that Interrupt active bit still seems like my best bet.
Ian.
2019-12-18 04:40 AM
It seems my issue is a known problem with V13.2 bootloader. Are 100pin QFP devices available with V9.0 bootloaders or do I still need a workaround? Was a workaround ever found?