The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

31

VDDA is not connected. Application note AN4325 Getting started with STM32F030xx and STM32F070xx series hardware development says, The VDDA supply can be equal to or higher than VDD. This allows VDD to stay low while still providing the full performance for the analog blocks. When a single supply is used, VDDA must be externally connected to VDD. So,...


18

I managed to solve that problem. If anybody encounters similar problem, here's what I've done: I used ST-Link v2 and ST-Link Utility. In setting, I set "Connect under reset" and SWD interface (I'm not sure about frequency). Then I press the reset button on my board and clicked "Target" -> "Erase chip" and just after clicking I released the button - It ...


17

Have you looked at your power supply waveform with an oscilloscope? The LF33 linear low-dropout voltage regulator you seem to be using requires a minimum of 2µF of added output capacitance for stability, your schematic only shows 100nF. Also, I don't see any input capacitance before the regulator. If the regulator is oscillating, it could be intermittently ...


14

You only need to put the microcontroller into bootloader mode if you're going to program it over the UART, using the bootloader. Generally speaking, you can program the microcontroller over SWD at any time. The primary exceptions are if the microcontroller is running a program that disables SWD by setting a SWJ_CFG bit in AFIO->MAPR (e.g, to use the ...


11

First of all, you are right, if your board has already got a supply voltage source you do not have to connect ST-Link's VDD pin. The second thing I would recommend you is to open the STM32F411 Nucleo board's reference manual and look at the schematics. Especially the part where the ST-Link is connected to the controller on the board. By ST Microelectronics,...


9

Target voltage detected: 0.601975 You need to power your target. The debug adapter does not provide power, it uses the Vtarget pin to determine the output voltage levels.


9

IF you are not aware of CMOS "buried SCR latch effect" with supply shoot-thru heat-damage effects from inputs rising greater than supplying voltage by 0.3V, you will never forget now. This is the same as applying analog signals before VddA is connected. The application note p11 clearly states what must be done , but not the reason. "• The POR monitors ...


9

In my professional experience I have found the STM32 to extremely sensitive transient voltages on the power rails and GPIO. Make sure that your power supplies aren't over-shooting on startup. On thing you can do to mitigate this is to add between 10uF and 100uF on the output of your voltages regulator. Good luck and let us know how it goes.


8

The bootloader is in ROM, it is not user-modifiable (ie: you can't "burn" a new bootloader). This appnote describes the bootloader features for different STM32 parts. On the all the STM32 parts that I've used, you pull BOOT0 to ground to bypass the bootloader and boot from flash (address 0x0800000 on most STM32s). With BOOT0 pulled low, the pin state of ...


7

All STM32 and STM8 chips can be debugged and programmed by an ST Link V2. However, you might need to update the ST Link firmware. See if it works with the ST Link Utility: STSW-LINK004. If yours does not work, then your breakout board will be faulty.


7

Let's take a look into LF33 datasheet: https://www.st.com/resource/en/datasheet/cd00000546.pdf Output bypass capacitance: ESR = 0.1 to 10 Ω Io = 0 to 500 mA Minimum: 2μF, Typical: 10μF Capacitance of 100nF, far away from LDO won't do the job. Try to check power line with oscilloscope. And do not fry next MCU without adding 10-47uF LOW ESR electrolytic ...


6

First of all thanks to everyone for their contribution. After two sleepless nights and struggle, I could find out the issue. The problem was in pin connections in my custom board: I thought that, in my MCU, Pin 9 (VDDA) is short-circuited with PINs 24-36-48, and Pin 8 (VSSA) with PINs 23-35-47, but it's not so. I needed to give another 3.3V and GND to ...


6

Where have you got the uC? Are they genuine? I have worked with lots o f stmf1 and had no problems with esd nor higher temp soldering Have you tried not flashing device? Just leave it on for some time. Where are you getting power to 5v? Maybe it is some leakage from that. Try to power it from USB from same PC you are using the flasher. Try getting a ftdi ...


5

I found the answer elsewhere but I will repeat it here for other people: Close Atollic TrueStudio (not sure if this is needed) Startup ST Utility Press the Reset button and keep it pressed Select Erase Chip (in Target menu) Release the Reset button The chip is erased Close ST Utility Startup Atollic TrueStudio Debug should work now


5

While you can use the serial or (on the `407 USB or several other interfaces) bootloader, realistically, you should get a cheap SWD adapter. You can even use a Discovery board for any SMT32 variant for this purpose, if you remove the jumpers that connect the stlink to the on-board target. While the bootloader gets you only code loading, the SWD interface (...


5

You could also flash the st-link and convert it to a Black Magic Probe. The same image will also convert a Blue Pill into a BMP. I've done both. The Blue Pill has the advantage that the usb-rs232 bridge the BMP exports is easily available. The BMP supports a range of chips to include but not limited to: ST Microelectronics STM32F0, STM32F1, STM32F3, ...


5

Right below Figure 10 of AN2586 it mentions: Resistor values are given only as a typical example. These pins can be tied directly to VDD or GND, but it is common practice to use resistors for a few reasons. Series resistors can provide some current-limiting protection to the microcontroller pins. Putting at least one resistor between the pin and VDD/GND ...


5

Check the data sheet for the maximum current the F030 will draw and set the current limit on your bench supply to deliver a little less than that amount to protect the micro. I've not checked the data sheet for your LDO (LF33) but for stability you'll need a bulk capacitor on the supply side an a smaller value capacitor on the micro side. The latter is not ...


4

For connect under reset to work the ST-Link must have control over the reset pin, if you tie it to ground the ST-Link has no chance to get the target running and gain access to it. If you pull the BOOT0 pin high during power up, the MCU will start into the internal bootloader and you can gain access using several serial protocols (see the reference manual ...


4

To add to the existing answer; some chips are known not to work properly with ST-LINK and OpenOCD. In particular, if your target is from the Atmel SAMD21 family of MCUs, you are likely to run into weird issues, where the processor is detected, but any attempts to erase flash sectors fail with an error. The reason is rather involved, to quote: AFAIK the ...


4

There are possibly many ways to program the board, using different tools. One of them, which seems quite easy is to use the ST-Link V2 (google it) and OpenOCD. Leave both boot jumpers to "0". Connect SWDIO, SWCLK, GND pins to the appropriate pins of the ST Link. Apply power to the board paying attention to whether it is 5V or 3.3V. The ST-Link conveniently ...


4

If you're using an ST-Link (SWD) programmer, then you don't need to put the board into "programming mode". A bootloader is what allows the chip to "download" and run a new program. The "programming mode" jumper uses the BOOT pins to signal to the ROM bootloader that it needs to get ready to download a new program, otherwise the chip will start running the ...


3

The conversion tool you're referring to is only intended for use with the on-board ST-Link debuggers included on ST's Discovery and Nucleo development boards. It does not work on standalone ST-Link debuggers.


3

The error "Failure at line:6 in 'Target Software Startup Scripts'. Please edit the debug configuration settings." appears to have multiple causes. I'm guessing it is the default response when the 'load' command in the debugger script fails. Here are two reasons I have run into: A fault in the FLASH memory in the MCU. You can verify this is the problem by ...


3

The SWD connector on a Discovery board (CN2) is not for programming the on-board Target MCU. Rather, it is to allow the on-board ST-LINK to be used to program an external target. If you want to program the on-board target with a different programmer, you will need to study the schematics, find all the relevant signals, and make sure the on-board programmer ...


3

There should be no real interaction between GDB or OpenOCD and the virtual serial port of an STM32 Discovery or Nucleo board, however the modemmanager package installed by default in Ubuntu and derived distributions will substantially delay availability of the CDC/ACM device after each reset, which typically includes not just connections but some ...


3

It seems that in the HAL project the SYS / Debug was not set to Serial Wire (this is not default). However, the first time it was possible to debug, but not afterwards anymore. The reason is that the JTAG/SWDIO is disabled during the application. When it is disabled, even a connection is hard to make. What worked: Set BOOT0 to 1 Keep Reset button pressed ...


3

Even an ST Link does not provide target power. You connect Vcc to power the level shifter in the ST Link. Such that the ST Link does not blow up an 1.8V target. The budget version of the ST Link on the development boards do not offer this, and are only capable of interfacing with 3.3V targets. If your target is 3.3V, and not powered from elsewhere, you can ...


3

Stability of the regulator is the trick here. Light loads are harder to keep stable, without added capacitance. I had a similar thing happen once with an LM317. The voltage in that circuit went towards 12v. Series control can go awry. I worked with NXP Arm7 processors that had a power up latchup problem, on the I/o pins. I suspect your issue is the ...


3

I finally found what was causing all these. Seems i had some problems in my grounding circuitry and some high voltage AC was appearing on the device during soldering and powerup and there wasn't a common ground present. Although the path was pretty high in impedance but apparently it caused a lot of harm... I've an STM8 blinking an LED for more than 5 ...


Only top voted, non community-wiki answers of a minimum length are eligible