cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Started with the STM32L562E-DK

BMcMi.1
Associate II

I downloaded all the recommended documentation & files including STM32CubeIDE 1.4.0 and

STM32CubeMX. I've read through pages and pages of the documentation and still don't have the slightest idea about how to run a simple example. Any help to get started with this development kit would be very much appreciated. Thank you.

5 REPLIES 5
Imen.D
ST Employee

Hello @BMcMi.1​ ,

Welcome to the STM32 Community😊.

I recommend that you check the working examples or Applications available under the STM32CubeL5 MCU package: \STM32Cube_FW_L5_V1.3.1\Projects\STM32L562E-DK\

You can find a set of examples with different tool chains (EWARM, MDK-ARM, STM32CubeIDE) and the ready to use ioc file.

Some resources should be helpful for you:

You can follow this application note AN5394: Getting started with projects based on the STM32L5 Series in STM32CubeIDE, that helps you on how to get started with STM32L5 projects in STM32CubeIDE.

Hope this helps you. If these resources don't meet your expectation, we are interested to know what do you need exactly.

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

Edit:

note that TrustZone® is disabled by default in all STM32L5xx devices. It is activated by setting the TZEN option bit in the FLASH_OPTR register when RDP level is set to Level 0.

Adding this Video related to STM32 and TrustZone:

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
BMcMi.1
Associate II

Hi,

Thank you for the response. I was able to make a lot of progress. However, when I attempted to launch the project (by right-clicking "TrustZoneEnabled_Secure" and selecting "Debug As"), I got the following error message:

Error message from debugger back end:

Error finishing flash operation

Failed to execute MI command:

load C:\\Users\\mcmil\\Desktop\\STMicro\\STM32Cube_FW_L5_V1.2.0\\Projects\\STM32L562E-DK\\Templates\\TrustZoneEnabled\\STM32CubeIDE\\Secure\\Debug\\TrustZoneEnabled_Secure.elf

Can you give me any ideas on how I can get past this error so my example project will run?

Thank you so much,

Brad McMillan

Hi,

I'm just getting started with posting here so this reply is similar to an earlier post. Thank you for your patience as I learn the system.

I was following the instructions on how to run example projects in AN5394 when I got an error message. In section 2.2.4 it said that I can create a debug configuration by right-clicking "TrustZoneEnabled_Secure" and selecting "Debug As". But, when I did that I got the following error message:

Error message from debugger back end:

Error finishing flash operation

Failed to execute MI command:

load C:\\Users\\mcmil\\Desktop\\STMicro\\STM32Cube_FW_L5_V1.2.0\\Projects\\STM32L562E-DK\\Templates\\TrustZoneEnabled\\STM32CubeIDE\\Secure\\Debug\\TrustZoneEnabled_Secure.elf

There was also another box that said "This kind of launch is configured to open the Debug perspective when it suspends. This Debug perspective is designed to support application debugging. It incorporates views for displaying the debug stack, variables and breakpoint management. Do you want to switch this perspective now?"

Can you give me any ideas on how I can get past this error so I can get the example project to run?

Thank you so much,

Brad McMillan

Check with STM32Cubeprogrammer If you can connect, and try erasing the firmware on the board. Try "Connect under Reset".

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

3 questions:

A. I was able to connect using STM32Cubeprogrammer. It looks like there are 2 different ways to erase firmware on the Erasing & Programming tab:

  1. Automatic Mode > Full chip erase > Start automatic mode
  2. Erase flash memory > Full chip erase

Which one should I use?

B. After I erase the firmware should I use STM32Cubeprogrammer to upload the example or should I go back to STMCubeIDE and try the same procedure I used before?

C. Where is "Connect under Reset" located?

Thank you once again.