2022-03-11 12:09 AM
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
There is source for QSPI but dont have OctoSPI.
I created external loader for custom board. But it didnt work. I am getting below errror.
I 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
Solved! Go to Solution.
2022-03-18 01:51 PM
Posted new build
2022-03-11 01:39 PM
Created this fork, and modified the loader with the pins as described
https://github.com/cturvey/stm32extldr/blob/main/h7_mx25lm51245g/README.md
This thread is a follow on from the following one
2022-03-11 05:50 PM
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
2022-03-13 10:57 PM
2022-03-15 03:52 AM
/* Definition for OSPI Pins */
#define OSPI_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define OSPI_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define OSPI_D0_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
#define OSPI_D1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
#define OSPI_D2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOE_CLK_ENABLE()
#define OSPI_D3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
#define OSPI_D4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define OSPI_D5_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define OSPI_D6_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define OSPI_D7_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
#define OSPI_DQS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define OSPI_CS_PIN GPIO_PIN_10
#define OSPI_CS_GPIO_PORT GPIOB
#define OSPI_CS_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_CLK_PIN GPIO_PIN_2
#define OSPI_CLK_GPIO_PORT GPIOB
#define OSPI_CLK_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D0_PIN GPIO_PIN_11
#define OSPI_D0_GPIO_PORT GPIOD
#define OSPI_D0_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D1_PIN GPIO_PIN_12
#define OSPI_D1_GPIO_PORT GPIOD
#define OSPI_D1_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D2_PIN GPIO_PIN_2
#define OSPI_D2_GPIO_PORT GPIOE
#define OSPI_D2_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D3_PIN GPIO_PIN_13
#define OSPI_D3_GPIO_PORT GPIOD
#define OSPI_D3_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D4_PIN GPIO_PIN_1
#define OSPI_D4_GPIO_PORT GPIOC
#define OSPI_D4_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_D5_PIN GPIO_PIN_2
#define OSPI_D5_GPIO_PORT GPIOC
#define OSPI_D5_PIN_AF GPIO_AF11_OCTOSPIM_P1
#define OSPI_D6_PIN GPIO_PIN_3
#define OSPI_D6_GPIO_PORT GPIOC
#define OSPI_D6_PIN_AF GPIO_AF11_OCTOSPIM_P1
#define OSPI_D7_PIN GPIO_PIN_7
#define OSPI_D7_GPIO_PORT GPIOD
#define OSPI_D7_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_DQS_PIN GPIO_PIN_5
#define OSPI_DQS_GPIO_PORT GPIOC
#define OSPI_DQS_PIN_AF GPIO_AF10_OCTOSPIM_P1
Hi @Community member I checked this file but I make same error
2022-03-15 07:04 AM
Ok, I will double check my work, but working blind here.
Were you using the SFIx version of the loader on the DISCO/DK board?
Does your own BSP code work with the part on your board?
@mattias norlander What's the difference between these two loaders?
MX25LM51245G_STM32H7B3I-DISCO.stldr
MX25LM51245G_STM32H7B3I-DISCO-SFIx.stldr
2022-03-15 07:21 AM
Dear @Community member
Were you using the SFIx version of the loader on the DISCO/DK board?
Yes, I used SFIx version on the DISCO/DK board
MX25LM51245G_STM32H7B3I-DISCO-SFIx, 0x90000000, NOR_FLASH, MX25LM51245G_STM32H7B3I-DISCO-SFIx.stldr
Does your own BSP code work with the part on your board?
Yes, work on my board.
2022-03-15 07:30 AM
To test if OctoSPI FLASH works, I made my pin connections the same as the DK development board. I made the pin connections with jumpers as space mounts. Then I was able to load FLASH with the external loader of the DK card. OctoSPI FLASH worked.(Shows some data incorrect or missing due to jumpers)
MX25LM51245G_STM32H7B3I-DISCO-SFIx, 0x90000000, NOR_FLASH, MX25LM51245G_STM32H7B3I-DISCO-SFIx.stldr
#define OSPI_CS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
#define OSPI_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
#define OSPI_D0_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
#define OSPI_D1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
#define OSPI_D2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
#define OSPI_D3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
#define OSPI_D4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
#define OSPI_D5_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
#define OSPI_D6_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
#define OSPI_D7_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
#define OSPI_DQS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
/* Definition for OSPI Pins */
/* OSPI_CLK */
#define OSPI_CS_PIN GPIO_PIN_6
#define OSPI_CS_GPIO_PORT GPIOG
#define OSPI_CS_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_CLK_PIN GPIO_PIN_2
#define OSPI_CLK_GPIO_PORT GPIOB
#define OSPI_CLK_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D0_PIN GPIO_PIN_11
#define OSPI_D0_GPIO_PORT GPIOD
#define OSPI_D0_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D1_PIN GPIO_PIN_9
#define OSPI_D1_GPIO_PORT GPIOF
#define OSPI_D1_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_D2_PIN GPIO_PIN_7
#define OSPI_D2_GPIO_PORT GPIOF
#define OSPI_D2_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_D3_PIN GPIO_PIN_6
#define OSPI_D3_GPIO_PORT GPIOF
#define OSPI_D3_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_D4_PIN GPIO_PIN_1
#define OSPI_D4_GPIO_PORT GPIOC
#define OSPI_D4_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_D5_PIN GPIO_PIN_3
#define OSPI_D5_GPIO_PORT GPIOH
#define OSPI_D5_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D6_PIN GPIO_PIN_9
#define OSPI_D6_GPIO_PORT GPIOG
#define OSPI_D6_PIN_AF GPIO_AF9_OCTOSPIM_P1
#define OSPI_D7_PIN GPIO_PIN_7
#define OSPI_D7_GPIO_PORT GPIOD
#define OSPI_D7_PIN_AF GPIO_AF10_OCTOSPIM_P1
#define OSPI_DQS_PIN GPIO_PIN_5
#define OSPI_DQS_GPIO_PORT GPIOC
#define OSPI_DQS_PIN_AF GPIO_AF10_OCTOSPIM_P1
So if the external loader was correct, it would work with the external loader you sent. But dont work
2022-03-15 09:13 AM
My hope was that it would. But I'm doing it blindly without a reference board/chip.
I checked the pin list.
I will patch the SFIx loader next, and will look at the clocking in case that's wrong.
What frequency is your HSE clock source?
Do you have a UART that's usable for debug/diagnostic output? Which one/pins?
2022-03-15 11:15 AM
Dear @Community member
What frequency is your HSE clock source?
My HSE clock is 25MHz
Do you have a UART that's usable for debug/diagnostic output? Which one/pins?
No I dont have. Why do you say this question?