STM32F103 Strange Behavior
Posted: Sun Mar 08, 2020 1:58 pm
Hi All,
I am encountering a very strange behavior from the STM32F103C8T6 and its diving me up the wall.... PLEASE HELP!
I have a relatively large firmware (Flash 82%, RAM 32%) that i developed in the prototyping stage of a device I'm working on. Everything works on the prototype which includes an OLED screen, capacitive touch sensors, EEPROM functions, Serial coms with a GSM module and internal RT clock. I developed it using Platform IO and VSCode and uploaded successfully using both USB bootloader or STlink V2.
The issue i have is that if i upload the same code on a "production" version of the device, the upload seems to go through but the device does nothing although inspecting it with the stlink utility shows that the code has been uploaded. I ofcourse went through an extensive hardware deboug to confirm there are no issues with the hardware. As an example if i disconnect all IO channels from the new hardware and just leave the MCU with the buttons and the screen I can upload a simple test code that confirms this works correctly. but if i try my code "the one that works on the prototype", it doesn't.
I initially thought that it might be because the prototype has the usb bootloader which the new device does not (i am uploading using STlink on the new device) but the fact that i can upload simple code that works makes me think that this is not it (or am I wrong and there are things that are needed from the usb bootloader that would only show issue with more complex code?? maybe RT Clock function??)
One thing that i tried and got another strange outcome is that if i export a .bin or.hex file from the working prototype using ST-Link Utility, I erase the working prototype chip and re-upload the .hex file, the prototype stops working too. (at this point I have to upload it from VSCode again either via USB or ST-link). I am starting to think that there is something I am missing when uploading .bin files from the ST-Link Utility??
Any suggestion will be much appreciated.
Thank you
I am encountering a very strange behavior from the STM32F103C8T6 and its diving me up the wall.... PLEASE HELP!
I have a relatively large firmware (Flash 82%, RAM 32%) that i developed in the prototyping stage of a device I'm working on. Everything works on the prototype which includes an OLED screen, capacitive touch sensors, EEPROM functions, Serial coms with a GSM module and internal RT clock. I developed it using Platform IO and VSCode and uploaded successfully using both USB bootloader or STlink V2.
The issue i have is that if i upload the same code on a "production" version of the device, the upload seems to go through but the device does nothing although inspecting it with the stlink utility shows that the code has been uploaded. I ofcourse went through an extensive hardware deboug to confirm there are no issues with the hardware. As an example if i disconnect all IO channels from the new hardware and just leave the MCU with the buttons and the screen I can upload a simple test code that confirms this works correctly. but if i try my code "the one that works on the prototype", it doesn't.
I initially thought that it might be because the prototype has the usb bootloader which the new device does not (i am uploading using STlink on the new device) but the fact that i can upload simple code that works makes me think that this is not it (or am I wrong and there are things that are needed from the usb bootloader that would only show issue with more complex code?? maybe RT Clock function??)
One thing that i tried and got another strange outcome is that if i export a .bin or.hex file from the working prototype using ST-Link Utility, I erase the working prototype chip and re-upload the .hex file, the prototype stops working too. (at this point I have to upload it from VSCode again either via USB or ST-link). I am starting to think that there is something I am missing when uploading .bin files from the ST-Link Utility??
Any suggestion will be much appreciated.
Thank you