cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to write on STM32L072CZ IOPORT registers with ST-LINK/V2 / ST-LINK_CLI.exe

NKA
Associate II

Hi,

ST-LINK/V2 ISOL plugged on STM32L072CZT6 (custom board, nReset pin on swd interface is pulled up)

Reading with ST-LINK_CLI.exe works fine. (-r32 0x50000000 gives 0xEBFFFCFF)

 

Tried the following in order to write :

C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility>ST-LINK_CLI.exe -c SWD -w32 0x50000000 0xEBFFFCF0
STM32 ST-LINK CLI v3.6.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: 55FF70067871515314171267
ST-LINK Firmware version: V2J40S7
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.0 V
Connection mode: Normal
Reset mode: Software reset
Device ID: 0x447
Device flash Size: 192 Kbytes
Device family: STM32L07x/L08x/L010

Writing 0xEBFFFCF0 at 0x50000000... Error!

 

I wonder whether there is any protection when trying a write access.

Any idea where to look up?

 

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
NKA
Associate II

Update

Problem solved. Microcontroller must be setup.

Thanks

regards,

View solution in original post

2 REPLIES 2
NKA
Associate II

Update

Tried to disable the firewall and flash write protection but still unable to access IOPORT memory in write mode while able to read.

Tried other available probes on market (SEGGER j-link/ARM Flasher, FTDI...) on pyOCD, openOCD even opensource stlink, pyswd, pylink... and they all work on read memory. writing remain an issue.

btw The STM32L0 IOPORT peripheral seems to be independent of any AHB or APB buses

Tried to set DBP in PWR_CR, RCC_IOPSTR didn't either help.

The RM I looked up:

Ultra-low-power STM32L0x2 advanced Arm®-based 32-bit MCUs - Reference manual

 

What am I missing? Please help

 

Regards,

NKA
Associate II

Update

Problem solved. Microcontroller must be setup.

Thanks

regards,