cancel
Showing results for 
Search instead for 
Did you mean: 

Can not Programm STM32L4R5 Nucleo Board

feuerwolf
Senior
Posted on January 17, 2018 at 13:11

Hallo!

Next to almost all other available nucelo boards I now own two STM32L4R5 Nucleo boards. The first one arrived last week, the second today. Long story short, i can not programm the Nucleo boards. Today i got a brand new borad, because i thought i might have bricked the other one. Connecting it first to PC the pre programmed  Push button & Blinking LED programm worked. Next step was checking the via ST-Link Upgrade the Firmware version which is V2.J29.M18 and seems to be up to date. I did not touch any jumper ( attached Photo) .

So i opened the STM32L4R5ZI-Nucleo examples from CubeMX and opened one example with Keil MDK ARM uVision and build it. But Programming now showed plenty of Errors ( Attached JPG): Errors like:

Content mismatch at: xxxxxx Flash xxxx...

Error: Flash Download failed

I also own a License of True Studio, so i generated a plain Project with cubeMX and also failed to programm the nucleo board, with a

Error writing data to flash

Failure at line:6 in 'target Software Startup Scripts'. Please edit debug Configuration settings.

which i checked, but couldnt find anything suspicious,

Startup Skripts:

# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers

# 2=32 bit, 1=16 bit and 0=8 bit parallelism mode

monitor flash set_parallelism_mode 2

# Load the program executable

load        

# Enable Debug connection in low power modes (DBGMCU->CR)

set *0xE0042004 = (*0xE0042004) | 0x7

# Set a breakpoint at main().

tbreak main

# Run to the breakpoint.

continue

I doublechecked the Jumpers with the Nucleo Manual but could find any wrong connections. All other MCUs L0 L1 L4 F4 ... can still be programmed.

Does this Problem sound familiar to anyone? Thnaks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on March 01, 2018 at 15:38

For anyone who don't uses the KEIL IDE: You can use the STM Cube Programmer to disable the DBANK flag in the Option Byte region of the processor like this:

0690X00000604IaQAI.jpg

View solution in original post

6 REPLIES 6
Posted on January 17, 2018 at 14:24

>>

Does this Problem sound familiar to anyone?

On the STM32L4R9-DISCO it was necessary to select the 'Dual Bank' variant of the Flash Algorithm for Keil to program the board. There should be two 2MB algorithms, pick the one you're currently not using.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
feuerwolf
Senior
Posted on January 17, 2018 at 16:22

Hallo Clive, its probably a totally stupid question to a pro user, but where can i find that option? Keil Help doest give results, The output of google is Zero. Only searching for Flash algorithm brings me to

http://www.keil.com/support/man/docs/uv4/uv4_fl_flash_algorithms.htm

 

which tells nothing but leads me to a folder where .FLM files are.

And in Keil the 'options for Target xxxxxx' is totally confusing for ARM beginners.

Could you please point me to that option?

feuerwolf
Senior
Posted on January 17, 2018 at 16:57

Thank you Clive One, that was the solution and very helpfull.

Posted on January 17, 2018 at 16:34

0690X00000603ykQAA.jpg
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 01, 2018 at 15:38

For anyone who don't uses the KEIL IDE: You can use the STM Cube Programmer to disable the DBANK flag in the Option Byte region of the processor like this:

0690X00000604IaQAI.jpg
Posted on April 05, 2018 at 15:27

Thanks, this is the correct solution in order to use Atollic True Studio with STML4+

Another Solution with activated FLAG would be to do a full chip erase via ST Link Utility every time a debug session with TS is started.