2021-09-14 12:03 AM
Hi,
I am new to QSPI. I working with stm32f469 disco that comes with external flash N25Q128A13EF840F. I had done the GUI part now I need to store data to external flash but I don't know how to do it. I had initialized qspi with STMCUBE default initialization. Any help
below is the way i had initialized
static void MX_QUADSPI_Init(void)
{
/* USER CODE BEGIN QUADSPI_Init 0 */
/* USER CODE END QUADSPI_Init 0 */
/* USER CODE BEGIN QUADSPI_Init 1 */
/* USER CODE END QUADSPI_Init 1 */
/* QUADSPI parameter configuration*/
hqspi.Instance = QUADSPI;
hqspi.Init.ClockPrescaler = 1;
hqspi.Init.FifoThreshold = 1;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
hqspi.Init.FlashSize = 24;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_5_CYCLE;
hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0;
hqspi.Init.FlashID = QSPI_FLASH_ID_1;
hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE;
if (HAL_QSPI_Init(&hqspi) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN QUADSPI_Init 2 */
/* USER CODE END QUADSPI_Init 2 */
}
2021-09-17 08:29 AM
Hi @himsha ,
The following article may be helpful for you: Where can I find source code of external loader (.stldr) for STM32 devices?
If this was really helpful, we appreciate upvoting for it (at the bottom of the page).
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-09-17 11:28 AM
Should be BSP side code for these parts in CubeF4, and if not there CubeF7/H7 ones
Should provide write/erase coverage
STM32Cube_FW_F4_V1.25.0\Drivers\BSP\Components\n25q128a\n25q128a.h
STM32Cube_FW_F4_V1.25.0\Drivers\BSP\STM32469I_EVAL\stm32469i_eval_qspi.c
STM32Cube_FW_F4_V1.25.0\Drivers\BSP\STM32F413H-Discovery\stm32f413h_discovery_qspi.c
Examples for some .STLDR can be found under ST-LINK Utilities or STM32 Cube Programmer directories.
Got some prebuilt external loaders for different parts and pin combinations here
https://github.com/cturvey/stm32extldr
Don't have much F4 stuff online as demand is low, but could be convinced to fashion some.