2023-09-20 05:38 PM
Hi Everyone,
I am working with an STM32F103C8T6 chip on a project.
For some reason I cannot flash the chip. It connects everytime I try though. I am using the SWD to flash. Is there anything you notice that is incorrect on or may be affecting the circuit? I have a lingering suspicion of the 16 MHz crystal, but I'm not sure. Any thoughts would be helpful. Thank you!
Ps. Please let me know if the image is not clear enough and I'll provide something better.
2023-09-20 05:49 PM - edited 2023-09-20 05:50 PM
Your schematic is fine.
The crystal can't cause it not to flash--the chip uses an internal clock during SWD programming.
> For some reason I cannot flash the chip. It connects everytime I try though. I am using the SWD to flash.
You say it connects. Why can't you flash? What happens when you try? Error messages? Other useful information? Can it read the flash out okay? What programmer are you using?
2023-09-22 03:13 PM
Sorry, I just saw your response. Still figuring out how the replies in this forum work. I had no errors at all. It is always successful according to the STM32 ST-Link Utility. I use an STM Nucleo with it. Of course when I first did it, I thought it didn't work, so I assumed something was wrong with the firmware. So I tried a few things.
I tried sending a signal to a gpio. I couldn't see a signal using a logic analyzer. I tried writing to serial and received nothing over the line as well. Please let me know if there is a better way to test.
I just noticed I'm able to read the flash on the ST-Link Utility. It does seem to match the binary.
Update while I was writing this. It works now. I really don't know how, but it does. I'm just freaking confused now. I feel like it's worse when you don't find an actual problem. I may have messed with the configuration of the Nucleo or the ST-Link while I was working on something, I don't know.
Well thank you TDK!
2024-08-06 09:43 PM
Hi Fmukete
I have seen your circuit diagram and suggest using 8Mhz crystal instead of 16Mhz crystal.