cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer error on STM32U545

Pc10
Associate II

Hi, I've developed a custom ExternalLoader for STM32U575VGT6Q installed on my board, following the online guides provided by ST, obtaining a fully functional version. On the new version of the board I have an STM32U545VET6Q, so in ExternalLoader project I've carried out the necessary porting for the new micro pinout, and the memory was replaced with a larger one but with the same interface.

On the new version of the board with STM32U545VET6Q, my ExternalLoader has been successfully tested in debug, both in reading and writing, but it does not work when launched from CubeProgrammer (with both versions 2.13 and 2.14 of CubeProg, the only ones that support U545). I attach the CubeProgrammer logs in the two cases, obtained with Verbosity Level 3. I've tried to read small portions of the external flash, but the CubeProgrammer interface always shows the error message when reading (same behavior for writing).

From the logs (the figure below shows an extract of the reading procedure for both micros) I've noticed that in the case of the U545 it seems that the ExtLoader binary is not loaded into RAM, unlike what happens on the U575 (lines 97-99 of the U575 log, absent in U545). Following this (and probably related to the previous problem..) the Main Stack Pointer of U575 seems to point to a coherent memory location, while on U545 it points to zero.

ReadProcedure.png

Does anyone have any suggestions on this?

Thank you

23 REPLIES 23

Ended up pulling from Newark(Farnell/Avnet) UK warehouse stock. No idea for absence from US suppliers, but should get boards next week.

https://www.newark.com/stmicroelectronics/nucleo-u545re-q/development-brd-32bit-arm-cortex/dp/78AK7432?ICID=I-HP-STM7REC-RP-1

 

// NUCLEO-U545
// PC0  AF3  IO7  CN7.38
// PC1  AF10 IO4  CN7.36
// PC2  AF10 IO5  CN7.35
// PC3  AF10 IO6  CN7.37
// PA0  AF10 NCS  CN7.28
// PA1  AF10 DQS  CN7.30
// PA2  AF10 NCS  CN10.35 ARD UART? SB35/SB37
// PA3  AF10 CLK  CN10.37 ARD UART?
// PA4  AF3  NCS  CN7.32
// PA6  AF10 IO3  CN10.13
// PA7  AF10 IO2  CN10.15
// PB0  AF10 IO1  CN7.34
// PB1  AF10 IO0  CN10.24
// PB2  AF10 DQS  CN10.24
// PB10 AF10 CLK  CN10.15
// PA12 AF6  NCS  CN10.12 USB?
// PC11 AF5  NCS  CN7.2
// PB5  AF3  NCLK CN10.29

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pc10
Associate II

Hi @Tesla DeLorean

I'm thinking about possible problems caused by the different RAM organization of the two microcontrollers.. any news from your side? Thanks

I have a couple of NUCLEO-U545RE-Q in hand, need to wire up a harness to a SOIC-16 ZIF socket.

I did build a tentative U545 loader off the U599 fork. Things I learned there, No OSPIM, No GPIOF, No OCTOSPI2

External Loader size less than 7KB, was successfully loaded by STM32 Cube Programmer V2.14 into RAM, and Init() called. Failed due to lack of physically attached QSPI device, and perhaps other bugs to-be-determined

https://github.com/cturvey/stm32extldr/blob/main/u5_w25q512/CLIVEONE-W25Q512_STM32U545-PB10-PA4-PB1-PB0-PA7-PA6.stldr

  10:11:57:102 : UPLOADING ...
  10:11:57:103 :   Size          : 1024 Bytes
  10:11:57:103 :   Address       : 0x90000000
  10:11:57:103 : Read progress:
  10:11:57:104 : Reading data...
  10:11:57:104 : halt ap 0 
  10:11:57:104 : w ap 0 reg 15 PC   (0x20000000)  
  10:11:57:104 : w ap 0 reg 17 MSP  (0x20000500)  
  10:11:57:104 : w ap 0 reg 16 xPSR (0x01000000)  
  10:11:57:104 : w ap 0 @0x20001AC0 : 0x00000200 bytes, Data 0x00000000...
  10:11:57:104 : w ap 0 @0x20000000 : 0x00000004 bytes, Data 0x0000BE00...
  10:11:57:144 : w ap 0 @0x20000004 : 0x0000168C bytes, Data 0x4000F080...
  10:11:57:144 : Loader read...
  10:11:57:144 : Init flashloader...
  10:11:57:145 : halt ap 0 
  10:11:57:145 : w ap 0 reg 0 R0   0x00000000
  10:11:57:145 : w ap 0 reg 1 R1   0x00000000
  10:11:57:145 : w ap 0 reg 2 R2   0x00000000
  10:11:57:145 : w ap 0 reg 3 R3   0x00000000
  10:11:57:145 : w ap 0 reg 4 R4   0x00000000
  10:11:57:146 : w ap 0 reg 5 R5   0x00000000
  10:11:57:146 : w ap 0 reg 6 R6   0x00000000
  10:11:57:146 : w ap 0 reg 7 R7   0x00000000
  10:11:57:146 : w ap 0 reg 8 R8   0x00000000
  10:11:57:146 : w ap 0 reg 9 R9   0x00000000
  10:11:57:146 : w ap 0 reg 10 R10  0x00000000
  10:11:57:146 : w ap 0 reg 11 R11  0x00000000
  10:11:57:146 : w ap 0 reg 12 R12  0x00000000
  10:11:57:147 : w ap 0 reg 13 SP   0x00000000
  10:11:57:147 : w ap 0 reg 14 LR   0x20000001
  10:11:57:147 : w ap 0 reg 15 PC   0x200007F5
  10:11:57:147 : w ap 0 reg 16 xPSR 0x01000000
  10:11:57:147 : w ap 0 reg 17 MSP  0x20001A8C
  10:11:57:147 : w ap 0 reg 18 PSP  0x00000000
  10:11:57:147 : run ap 0 
  10:11:57:148 : halt ap 0 
  10:11:57:148 : r ap 0 reg 0 R0   0x00000000
  10:11:57:148 : Init function fail
  10:11:57:148 : r ap 0 reg 16 xPSR 0x41000000
  10:11:57:149 : halt ap 0 
  10:11:57:149 : w ap 0 reg 15 PC   (0x20000000)  
  10:11:57:149 : w ap 0 reg 17 MSP  (0x20000500)  
  10:11:57:149 : w ap 0 reg 16 xPSR (0x01000000)  
  10:11:57:149 : Error: Data read failed

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Built the fixture this evening, and tested/validated with a Winbond W25Q256 loader

Looks like I have access to enough pins to facilitate OCTO on something like a Macronix MX25LM51245G

 

PB10:AF10 CLK
PA4:AF3   NCS
PB1:AF10  IO0
PB0:AF10  IO1
PA7:AF10  IO2
PA6:AF10  IO3

PC1:AF10  IO4
PC2:AF10  IO5
PC3:AF10  IO6
PC0:AF3   IO7
PB2:AF10  DQS

 

20231118_072540_shrunk.jpg20231118_072345_shrunk.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..