Skip to main content
Associate II
August 25, 2026
Question

STM32L021D4P7 this MCU not able to dump the code

  • August 25, 2026
  • 5 replies
  • 125 views

I have taken one dot board  a placed the MCU (TSSOP14) STM32L021D4P7 wired with STLINK V2 programmer , Boot0 pin to pull up and pull down option with jumper wire , NRST pin also same pull up 10kohm and jumper wire to pull down to ground. In STM32 CUBE programmer latest version i am using STM32CubeProgrammer 2.23.0 , chip is only detecting if under hot plug mode , under reset mode it not working , its first time from factory its programming through SWDIO /SWCLK VCC and VSS . After detecting the hex file if a loaded its showing internal memory [0 45] failed to erase, so RDP - i kept to AA it in STMcube programmer after that if i click file for programming in GUI its crashing the tool. Kindly give help to program this IC. 

5 replies

TDK
August 25, 2026

Show a picture of the setup and a screenshot of STM32CubeProgrammer when the error happens.

 

Is the chip powered? Does STM32CubeProgrammer reflect this correctly?

Is the board (?) design correct, with decoupling capacitors? Show this.

Are you using a legit programmer? Which one? “STLINK V2” is ambiguous.

How to recognize a genuine ST-LINK/V2 versus a cloned one | Community

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
August 26, 2026
  1. Chip powered 3.3v with hot plug mode chip is being detected , not under reset mode why ? 
  2. decap 0.1uf i am going to add and try , before that NRST and BOOT0 pin has a 10kohm pull up resistor with 3.3v and a jumper wire for shorting to gnd. Show in BOOT0 and NRST pin what should placed?
  3. In hot plug mode this is detected , but not able to dump the hex file attached a error image 
  4. first clarify we can use this blue color USB STLINK for this CHIP to program or white color is original one ?
  5.  I have tryed one more thing a RDP option byte was previously 0 so i changed to AA as no protection after updating that its not coming successfully. STM32 cube programmer GUI is crashing.
Associate II
August 26, 2026

0.1UF  also connected to reset chip not detected.
any external oscillator is needed for this chip : STM32L021D4P7

TDK
August 26, 2026

I would guess this is a failure of any decoupling capacitors. Your board layout is missing all of them.

Getting started with STM32L0xx hardware development

The blue programmer is a knock off programmer and may or may not work. The white one could be either fake or genuine. Did you read the link in my previous post?

 

Soldering to a bare chip seems odd. It would be better to solder the chip to the board where it will be used, then program it there.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
August 26, 2026

For this programming do we need a external oscillator.

Programmer you suggest a original one to buy most almost not to differentiate clone vs original.

1. NRST pin  and BOOT0 pin has a 10kohm pull up resistor with 3.3v and a jumper wire for shorting to gnd. Show in BOOT0 and NRST pin what should placed? For programming which should be high or low 

2. In hot plug mode this is detected , but not able to dump the hex file attached a error image  - why ? 

3. Do you have any evaluation kit for specific to this IC.

Kindly address this three technical queries it would be great help