Good morning,
My company has tasked my engineering team with making a programming unit (PU) for a product we sell, for use by the manufacturing team.
The PU needs to load a .hex file on the device, and then pass some configuration information to the device via UART.
We are using an STLinkV3 to do this, and a USB to RS485 cable, with an RS485 to TTL converter via a custom connection on our product.
All equipment has been checked and is working correctly.
Our problem is; after the very first programming of the STM32G071KBU6, none of the unterrupts seem to be firing. Our UART RX uses interrupts to recieve, so we are unable to load the configuration information onto the microcontroller. I was able to confirm that the program is running by using IAR “attach to target” feature, which allows a user to view the currrent state of the program without resetting the device.
Things I have tried:
- While attached to target, set a breakpoint on SysTick Interrupt handler (which never breaks)
- Paused the program to confirm that it is running the code (it is, and I can step through code as normal)
- Attempted to send configuration information while attached to target, using the Disassebly menu to observe the assembly code, the program jumps to a different place in memory, but never seems to return or execute the UART interrupt routine
Only a full power cycle of the STM micro fixes this issue (After a power cycle, everything operates normally and as expected – we can load the configuration information). Toggling the hardware and software reset via CubeProgrammer does nothing, reprogramming does nothing to fix the issue also. Ideally I don’t want to have to power cycle the product as part of the manufacturing process.
I can see in the Errata section 2.2.10 there is an issue with the boot0 pin immediately after programming, until the micro is rebooted. However I have nBOOT_SEL = 1 in the option bytes (BOOT0 signal is defined by option bit) which is set to boot from flash, so I don’t think this applies to this situation, plus I have already confirmed that the program is running.
Any help will be appreciated.