2021-06-27 04:32 AM
Hi all,
I have recently made a circuit for a STM32L031G4U6, but it’s
totally not working. I'm using a FTDI flash and the boot pin should be set high
to boot from the system memory. According to the log message from the Arduino IDE
it does upload the sketch even if the boot pin is set low, but it does not
execute it either way. Is there something wrong with my circuit? Or is there
another thing, of which I did not take care of? I’ve attached a picture of the
schematic below. Also that’s my first time working with STM32.
Thanks for the help.
2021-06-27 07:28 AM
The schematic looks fine.
It is odd that you can program the chip even if BOOT0 is high and flash is not erased. Are you sure about this?
How do you know it doesn't execute it, as opposed to it getting hung up somewhere within the code? Creating firmware on a board without debug capabilities is often slow.
2021-06-27 10:50 AM
Use a tool chain that actually contains a debugger.
Might have to fix library and variant code.
2021-06-27 11:16 AM
Well that's actually not the entire layout. Actually all the pins are exposed. At first I tried printing out a simple hello world program using the serial connection which somehow did not work. Then I tried to make it even simpler and just let an led blink which also did not work. Am I doing something wrong with the upload routine? I found no instructions online on what steps are required for this particular MCU. I just tied BOOT0 to GND pressed the reset button and uploaded the code which worked fine but it didn’t execute. The same thing happened when BOOT0 was high.
Do we have to do anything else after the upload?
2021-06-27 11:35 AM
> I found no instructions online on what steps are required for this particular MCU.
https://www.st.com/en/development-tools/stm32cubeprog.html
> I just tied BOOT0 to GND pressed the reset button and uploaded the code
Tying BOOT0 low will run user code, not the bootloader. How are you "uploading the code" in particular? Are you using a programmer or just sending stuff over UART with some program?
> Do we have to do anything else after the upload?
Typically, after programming, a verification step is done to verify memory was written correctly. That would be step 1 of debugging it.