STM32L5: External loader does not work
Hi,
With the STM32L562E-DK devoplement kit, I have developed a working touchGFX application without Trustzone. The external loader MX25LM51245G_STM32L562E-DK works as expected with STM32CubeProgrammer (version 2.14.0)
However, I need trustzone, so I enabled the trustzone bit. Now, with the Trustzone bit, the external loader MX25LM51245G_STM32L562E-DK does not work (the MX25LM51245G_STM32L562E-DK-SFIx is also not working).
Not working means: erase one section gives no error (only a message that protected sections are not erased), but programming failes with the message: failed to erase sectors.
The sectors are not protected, with the cubeMX example projects the external flash is working with TrustZone enabled.
I have downloaded the source code of the external loader (git@github.com:STMicroelectronics/stm32-external-loader.git STM32L5x_boards/MX25LM51245G_STM32L562E-DK) and requested a trial version of the IAR IDE Arm (version 9.40.1). I build the stldr file and put the loader in the ExternalLoader directory of STM32CubeProgrammer. With this version, even the erase one sector fails.
Why is the behaviour of the unchanged version of the external loader different after a recompile?
I have followed a tutorial for creating your own external loader, however, they also are not working. From the debug output, it seems that the MSP is set to zero.
Is the MX25LM51245G_STM32L562E-DK suppost to work with a STM32L562 with trustzone enabled?
Is there another external loader which I can use?
I have a lot of logs of the verbose level 3 of the cube programmer, but I doubt if that gives usefull information.
Any help is much appriciated.
Best regards, Pieter
