2024-03-27 07:16 AM
I am using NUCLEO-H563ZI evaluation board and i want to create external flash loader for IS25LP128 QSPI flash memory. I used external loader files from GIT HUB and .stldr file in STCUBE programmer external loader folder location. when i try to read from 0x90000000 location, i am getting read failure error. I used the below path to create external loader for IS25LP128 QSPI flash memory,
Could you please help me to solve the below issue?
Solved! Go to Solution.
2024-06-02 07:35 AM
@STOne-32 @STTwo-32 @KDJEM.1 AF mapping annoyance / inconsistency across products in H7 family
H730/H723 PA3:AF12 OCTOSPIM_P1_CLK
H7A3/H7B3 PA3:AF3 OCTOSPIM_P1_CLK
https://www.st.com/resource/en/datasheet/stm32h730ab.pdf
https://www.st.com/resource/en/datasheet/stm32h7a3ii.pdf
https://www.st.com/resource/en/datasheet/stm32h723zg.pdf
2024-06-02 08:07 AM
Try your pin configuration here
https://github.com/cturvey/stm32extldr/blob/main/h7_is25lp128/README.md
2024-06-02 09:33 AM
YES! This works out of the box, tried reading and writing. Giant step for our project. Thank You very much. I'll ask my collegues to put some contribution to You paypal account, otherwise I'll do.
2024-06-02 10:18 AM - edited 2024-06-02 10:19 AM
It might be Rust-/probe-rs-specific, but maybe You have a helpful hint for this:
https://users.rust-lang.org/t/create-own-flash-algorithm-from-binary/108885/4?u=pkoevesdi
Failed to find 'FlashDevice' symbol in ELF file.
When I look at this:
https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/flashAlgorithm.html#CreateFPA
there's supposed to be one, independently of Rust / probe-rs?
2024-06-08 08:42 AM
Hmm, I don't know what happened, now one week later, without chaning anything, it stops working: I get "Error: Read filed".
The verbosity level 3 says:
17:40:06:168 : UPLOADING ...
17:40:06:168 : Size : 131072 Bytes
17:40:06:168 : Address : 0x90000000
17:40:06:168 : Read progress:
17:40:06:168 : Reading data...
17:40:06:198 : halt ap 0
17:40:06:198 : w ap 0 reg 15 PC (0x24000000)
17:40:06:198 : w ap 0 reg 17 MSP (0x24000500)
17:40:06:198 : w ap 0 reg 16 xPSR (0x01000000)
17:40:06:198 : w ap 0 @0x24001F00 : 0x00000200 bytes, Data 0x00000000...
17:40:06:198 : w ap 0 @0x24000000 : 0x00000004 bytes, Data 0x0000BE00...
17:40:06:237 : w ap 0 @0x24000004 : 0x00001AD8 bytes, Data 0x4000F080...
17:40:06:237 : Loader read...
17:40:06:237 : Init flashloader...
17:40:06:237 : halt ap 0
17:40:06:237 : w ap 0 reg 0 R0 0x00000000
17:40:06:237 : w ap 0 reg 1 R1 0x00000000
17:40:06:237 : w ap 0 reg 2 R2 0x00000000
17:40:06:237 : w ap 0 reg 3 R3 0x00000000
17:40:06:237 : w ap 0 reg 4 R4 0x00000000
17:40:06:237 : w ap 0 reg 5 R5 0x00000000
17:40:06:237 : w ap 0 reg 6 R6 0x00000000
17:40:06:237 : w ap 0 reg 7 R7 0x00000000
17:40:06:237 : w ap 0 reg 8 R8 0x00000000
17:40:06:237 : w ap 0 reg 9 R9 0x00000000
17:40:06:237 : w ap 0 reg 10 R10 0x00000000
17:40:06:237 : w ap 0 reg 11 R11 0x00000000
17:40:06:237 : w ap 0 reg 12 R12 0x00000000
17:40:06:237 : w ap 0 reg 13 SP 0x00000000
17:40:06:237 : w ap 0 reg 14 LR 0x24000001
17:40:06:237 : w ap 0 reg 15 PC 0x240007C1
17:40:06:237 : w ap 0 reg 16 xPSR 0x01000000
17:40:06:238 : w ap 0 reg 17 MSP 0x24001ED8
17:40:06:238 : w ap 0 reg 18 PSP 0x00000000
17:40:06:238 : run ap 0
17:40:06:238 : halt ap 0
17:40:06:238 : r ap 0 reg 0 R0 0x00000000
17:40:06:238 : Init function fail
17:40:06:238 : r ap 0 reg 16 xPSR 0x61000000
17:40:06:243 : halt ap 0
17:40:06:243 : w ap 0 reg 15 PC (0x24000000)
17:40:06:243 : w ap 0 reg 17 MSP (0x24000500)
17:40:06:243 : w ap 0 reg 16 xPSR (0x01000000)
17:40:06:243 : Error: Data read failed
17:40:06:427 : r ap 0 @0x1FF1E7FE 0x00000004 bytes Data 0x00240092
How can I track this down? Where can I start?
2024-06-08 09:58 AM
Failing in the Init() function. Does check for an ISSI device responding correctly.
Power cycle board completely and retry, chip might be in unanticipated mode
2024-06-08 11:50 AM
Power cycling I tried before, that didn't help.
But, now it works again! Only thing that changed in between: I ran my rust program, that initialises and runs some read and write tests on the memory.
So, there might be some init step missing, that my rust program does? Either on the MCU or on the memory (more likely)?
But, strangely, it keeps working after another full power cycle, without running my rust program again. Maybe I have to wait another week? ;)
I can't explain this.
2024-06-08 12:17 PM
Ok, I think i figured out: It's a different rust program I tried, which itself works, but after which the external loader doesn't work anymore. Running my above mentioned first rust program again, also makes the external loader work again.
The reason: my second rust program initializes the QPI mode (Qpien = 0x35, // Enter QPI mode), the first deinitilaizes it (Qpidi = 0xF5, // Exit QPI mode).
Seemingly, this mode survives a power cycle of the flash memory.
2024-06-08 01:02 PM - edited 2024-06-08 01:06 PM
Maybe it would make sense to either use the QPI mode (preferrable), which would have to be set in the flash chip (command 0x35) and be configured in the MCU, or deactivate the QPI mode in the flash chip (command 0xF5), if the external loader doesn't use it. But either way: bring the flash chip into a defined mode on initialization, don't leave it in any random mode, this could lead to problems or questions for many users.
Or is it somwhere defined / common sense / best practice to bring the flash into normal SPI mode before using an external loader?
2024-06-08 03:31 PM
I might need to look at and rework the reset/restart mechanics.