Skip to main content
Freedom_Neo
Senior
Mar 11, 2022 8:09 AM UTC
Solved

How to make external OctoSPI loader for STM32H7?

I am using below componnet tools

MCU: STM32H7B3IIT6

IDE: STM32CubeIDE Version: 1.8.0

GUI: TouchGFX Version: 4.18.1

SDRAM: IS45S16800F-7CTLA1-TR

FLASH: MX25LM51245GMI00 (OctoSPI)

I am using below pins

// STM32H7B3IIT6 PIN CHART
// MX25LM51245GMI00
 
// OCTOSPIM P1
// D0 PD11:AF9 
// D1 PD12:AF9 
// D2 PE2:AF9 
// D3 PD13:AF9
// D4 PC1:AF10 
// D5 PC2:AF11 
// D6 PC3:AF11 
// D7 PD7:AF10
// CLK PB2:AF9
// NCLK NOT USED
// NCS PB10:AF9 
// DQS PC5:AF10

I am using below configuration

0693W00000KcDD9QAN.jpg0693W00000KcDDEQA3.pngThere is source for QSPI but dont have OctoSPI.

I created external loader for custom board. But it didnt work. I am getting below errror.

0693W00000KcCqzQAF.pngI shared external loader project file at attachment. Can you review it please? I need your support.

https://drive.google.com/file/d/1m1aCF1FueA2xE2qVvX7kWM_29_l7sNRr/view?usp=sharing

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Mar 18, 2022 8:51 PM UTC

Posted new build

https://github.com/cturvey/stm32extldr/blob/main/h7_mx25lm51245g/MX25LM51245GMI00_STM32H7B3IIT6_NEO.stldr

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

30 replies

Tesla DeLorean
Guru
Mar 11, 2022 9:39 PM UTC
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
Mar 12, 2022 1:50 AM UTC

The above modified the H7A3-DK loader

Looking at your project, but the loader gets to be quite large

This uses the 0x20000004 RAM base, H7 loaders typically use 0x24000004

STM32H7B3IIT6_External_Loader\linker.ld

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PDixo.1
Associate III
May 5, 2022 11:02 AM UTC

I'm using a STM32H735IGK6 processor with a MX66LM1G45GXDI00 flash memory (couldn't buy anything similar to the memory on the dev board).

I cant find a loader for this memory device online so I need to tailor my own but finding it hard to get any data on how to do this.

Has a tutorial been created for this yet?

Or is there any guidance on do this with an octospi interface?

Tesla DeLorean
Guru
May 5, 2022 4:55 PM UTC

There are tutorials for QUADSPI, aren't those almost directly applicable to OCTOSPI?

The HARD concept is the External Loader method/mechanics, not the SPI vs QUADSPI vs PARALLEL, and then memory-mapped, vs not.

Step#1 here is to write and test your own BSP code, with a specific focus on the Erase and Write portions, for the hardware you've built/created. You do this at an application level so you can test and instrument the code and get a clear understanding of the commands, status and control settings, and time these operations take. The memory is optimized for the Read task/operation, so most everything else is relatively slow, and needs to be paced by the memory and it's status reporting.

There should be example OCTOSPI BSP for L4+ and H7 boards, and chip combos.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PDixo.1
Associate III
May 6, 2022 9:23 AM UTC

My connections are the same as the STM32H735G-DK board.

J13 PD11 OSCSP11_100

J15 PD12 OSCSP11_101

C3 PE2 OSCSP11_102

H15 PD13 OSCSP11_103

C9 PD4 OSCSP11_104

B9 PD5 OSCSP11_105

A8 PG9 OSCSP11_106

B8 PD7 OSCSP11_107

K3 PF10 OSCSP11_CLK

P7 PB2 OSCSP11_DOS

F14 PG6 OSCSP11_NCS

Extract from STM32H735G-DK schematic and my schematic.

0693W00000NpRQUQA3.png0693W00000NpRMhQAN.png

Tesla DeLorean
Guru
May 6, 2022 12:50 PM UTC

Does the DISCO loader see the first half of the memory?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PDixo.1
Associate III
May 6, 2022 1:04 PM UTC

I assume you are asking as this memory is twice the size of the original, but as yet I cant access the memory at all.

Tesla DeLorean
Guru
May 6, 2022 4:15 PM UTC

I'm just trying to gauge the level of complexity and routes to fixing, as I don't have any of these Macronix chips, and can mostly work with the SOIC16W parts, SOP16 300-mil, or whatever the preferred designation is. Not seeing stocks of those either.

Never mind, I found some MX66L1G45GMI-10G and -08G parts, DigiKey has 33K parts, indicates the -10G is NRND and non-stocked. Pricing close to $16

I'd have thought command set would be quite similar. Erase block sizes look consistent.

I did observe that the OCTOSPI on the H7Ax/7Bx and H72x/H73x DISCO/DK are using different pins.

Can you access the memory via your own BSP implementation, reading out the JEDEC CHIP ID?

Place holder for loader project(s)

https://github.com/cturvey/stm32extldr/tree/main/h7_mx66l1g45g QUAD

https://github.com/cturvey/stm32extldr/tree/main/h7_mx66lm1g45g OCTO

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
May 13, 2022 8:07 PM UTC

Ok, the MX66L1G45GMI parts from DigiKey in SOP16 are the QuadSPI "L" parts, I was unable to find any of the OctoSPI "LM" parts in the SOP16/SOIC16W form factor, only CSP, but Macronix is sending some MX66LM1G45GMI00 parts to support the project, so thanks go out to them.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PDixo.1
Associate III
May 16, 2022 8:56 AM UTC

Thanks for your work on this.

So far I haven't been able to get anything sensible from the memory but I am still working on it.