cancel
Showing results for 
Search instead for 
Did you mean: 

Program works with Keil but fails with CubeProgrammer

Rafa096
Associate II

Situation context:

We have a device with an STM32F103 mcu that has an IAP, that hasn't change in a few years, and we came up with a new version after a long without updating the device. The thing is that the new version works fine as long as the program is flashed via Keil either on Debug mode or Download mode over jtag. The problem comes with virgin devices, in production they download the new version using CubeProgrammer, the usual way of doing it is to perform a "Full chip erase" then download the IAP and then the program, this results in the device rebooting all the time and impossible to debug as it gets lost when we open a debug session in Keil. After discarding if it's a hardware problem I get one of this devices and redo the whole thing using v2.14, v2.18 and v2.19 of the CubeProgrammer with same results with each version. 

The funny thing comes when I use Keil on the same device, I erase the flash memory, download the IAP and then download the program, this works fine, as it was when I was developing the new version. Then, on the same device, I do the same thing with CubeProgrammer ("Full chip erase" then download the IAP and then the program) and now the program works fine as well...

I don't know how this is possible, is this a known issue with CubeProgrammer or is it a problem with the new things I added? How is it possible that when the device is programmed with CubeProgrammer doesn't work then is programmed with Keil via jtag and then it's programmed again with Cube everything works fine?

Regards

Rafa

1 REPLY 1
TDK
Super User

Compare the content of the flash after flashing with the two methods.

If they're the same, the chip behavior will be the same. Chip doesn't know or care what method was used to flash it.

If they're different, you're not flashing the same program.

If you feel a post has answered your question, please click "Accept as Solution".