2016-11-08 04:47 AM
Hi,
I have written an application code in PC which programs hex file (Generated using keil microvision - Intel hex format) to STM32F070RB Microcontroller using microcontroller's internal bootloader and USART interface. The hex file flashed is working fine as expected (Tested with a small LED blink program).But the issue is, after I used internal bootloader to flash MCU, the MCU doesn't go into debug mode even after flashing with Keil ULINK2 debugger. But the hex file flashed using debugger is also working fine as expected. Only debug is not working.Procedure to reproduce the issue.1. Program the MCU using its internal bootloader and USART interface Observation: The hex file flashed is working fine as expected (Tested with a small LED blink program)2. Program the MCU using Keil Microvision and Keil ULINK2 debugger. Observation: Able to test the hex file flashed and working fine as expected. But meanwhile some errors observed and not able to go into debug mode.''Contents mismatch at some memory locations in flash'' and ''Flash download failed'' Please find the attached image.Please help me to debug this issue.ThanksManjunath2016-11-08 05:16 AM
Hey manjunath,
Have you checked whether your hex file is compiled as debug? In keil, there are settings, where you configure the optimization level. One of them is for debug or it's just called level 0 or so (don't remember as every tool calls it differently). Once you compile your code with these options, it should be possible to debug your app using Keil. I hope this helps, Renegade2016-11-08 06:59 AM
Is this a board of your own design? Running at what voltage and speed?
Seems odd that Keil wouldn't program properly. Do you have the right programming algorithm selected?