Can not Programm STM32L4R5 Nucleo Board

Share code examples or discuss embedded software, including device drivers, interrupt handlers, middleware and application code.

Moderators: Markus Girdland, Mattias Norlander

feuerwolf66
Posts: 9
Joined: Thu Jul 06, 2017 10:00 am

Can not Programm STM32L4R5 Nucleo Board

Postby feuerwolf66 » Wed Jan 17, 2018 2:57 pm

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) .

I 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.

I posted this in STM Forum and a user replyed that he had to select "Dual Bank" in Keil for flashing. Where can i select dual Bank in Atollic?
thanks
You do not have the required permissions to view the files attached to this post.

frank_ee
Posts: 65
Joined: Wed Apr 05, 2017 5:08 pm
Location: USA

Re: Can not Programm STM32L4R5 Nucleo Board

Postby frank_ee » Wed Jan 17, 2018 7:44 pm

Hello,

Is the ST Link working? Your debug setup is properly configured? Perhaps start with a new project and see if the board is programmed.

feuerwolf66
Posts: 9
Joined: Thu Jul 06, 2017 10:00 am

Re: Can not Programm STM32L4R5 Nucleo Board

Postby feuerwolf66 » Thu Jan 18, 2018 7:51 am

well well... this question I should have put in " Atollic TrueSTUDIO tool discussions " and not here

Yes St Link is working. In Keil the solution was to change the programming algorithm for that Mcu to Dual Flash. In Atollic it must be similar. the issue has to do with the flash algorithm.

Anyway i will open a support ticket directly since i payed for Atollic support

DD4DA
Posts: 40
Joined: Thu Jan 11, 2018 10:06 pm

Re: Can not Programm STM32L4R5 Nucleo Board

Postby DD4DA » Sat Feb 10, 2018 12:42 pm

It would be nice if you publish the solution - this is helpfull for others.

feuerwolf66
Posts: 9
Joined: Thu Jul 06, 2017 10:00 am

Re: Can not Programm STM32L4R5 Nucleo Board

Postby feuerwolf66 » Sun Feb 11, 2018 12:43 pm

There is no solution. Atollic support was not able to help me or solve that. I can connect via ST Link utility and Keil to the nucleo board, but not within Atollic. They told me to use ST Link utility as additional tool for debugging inside Atollic like described in the manual, but that failed as well. Then I told them to buy such a nucleo board and try it themself, but didnt hear anything from them anylonger...

DD4DA
Posts: 40
Joined: Thu Jan 11, 2018 10:06 pm

Re: Can not Programm STM32L4R5 Nucleo Board

Postby DD4DA » Sun Feb 11, 2018 2:16 pm

Well, the st-link tool is a nice tool watching the memory as a dump, but unable to do a source code level debugging. It's also a very good tool to setup the flags or upload data/code into the external memory of the disco boards. It's swiss-army knife for the one-time task or mass programming.
This is not a tool for debugging.

As i understand that right, the dual bank feature is build in to have two different places for code and data. You can't gain access them parallel - Code in bank one, data in bank 2 - but not mixed.


Look here at chapter 3.x and especialy the grafic of the possible usage.

http://www.st.com/content/ccc/resource/ ... 230416.pdf

I don't know what your application should do, but this controller seems to be limited in the memory layout. Keil often uses small programms who are uploaded and run previously - similar like the st-link tool. GNU DBG are not able to do that. did you had ever testet the j-link debugger and uploader ? This are free available an replaces the on-board st-link debugger. The handling of the mcu will handled by the j-link toolchain and they are more versatile. Atollic support this tools. If this don't works, use the segger ozone debugger - this is a native solution and quit more versatile and powerfull. Sometimes i use this ozone debugger tool, if the bug is tricky and the capabilities of the build-in debugging is to limited.
Ozone is also free available but support j-link only.
The debugger firmware (st.-link ) is easy to replace and vice versa. If i need the st-link tool to upload data into external memory (Fontsets, static tables, graphic images), i do this sometimes to update them.

I hope this will helps you a little bit. Let me know the solution.

feuerwolf66
Posts: 9
Joined: Thu Jul 06, 2017 10:00 am

Re: Can not Programm STM32L4R5 Nucleo Board

Postby feuerwolf66 » Sun Feb 11, 2018 5:42 pm

Hi, i also tried segger j link witch was not successful on that new nucleo specific board. All other nucleo boards work fine with it within TS

DD4DA
Posts: 40
Joined: Thu Jan 11, 2018 10:06 pm

Re: Can not Programm STM32L4R5 Nucleo Board

Postby DD4DA » Sun Feb 11, 2018 7:13 pm

Well, is the project depending on the specific board? I had never used controllers less than a 72Mhz STM32F103 with a low pincount. Cheap and versatile.

I guess that ST will suppoort the board sooner or later - TrueStudio is new for ST.

cordis
Posts: 1
Joined: Thu Apr 05, 2018 9:47 am

Re: Can not Programm STM32L4R5 Nucleo Board

Postby cordis » Thu Apr 05, 2018 10:07 am

Still no solution for the problem? The website of Attolic states the processor as supported https://atollic.com/stmicroelectronics/#STM32L4+

I have used Keil as a temporarily solution but i would like to return to Attolic.

feuerwolf66
Posts: 9
Joined: Thu Jul 06, 2017 10:00 am

Re: Can not Programm STM32L4R5 Nucleo Board

Postby feuerwolf66 » Thu Apr 05, 2018 1:29 pm

you can find the Solution here:

https://community.st.com/thread/46668-c ... cleo-board

you have to deactivate DBANK Flag via STM32 Cube Programmer


Return to “Embedded target code development discussions”

Who is online

Users browsing this forum: No registered users and 1 guest