BSP QSPI vs CubeMx Initialization Difference
l have initialized the Micron MT25TL01G QSPI chip with the BSP_QSPI_Init() function. I am able to read, write, and erase data to the QSPI using the underlying MT25TL01G functions beneath the BSP. Whenever l remove the BSP initialization l don't receive an output from MT25TL01G_ReadDTR().
This may sound silly, but doesn't CubeMx initialize the QSPI Chip with HAL_QSPI_Init?
Could this be an QSPI_MspInit() vs HAL_QSPI_MspInit() configuration issue?
Parameters:
/* QUADSPI parameter configuration*/
hqspi.Instance = QUADSPI;
hqspi.Init.ClockPrescaler = 2;
hqspi.Init.FifoThreshold = 4;
hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE;
hqspi.Init.FlashSize = 25;
hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_2_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 */
BSP_QSPI_Init_t init;
init.InterfaceMode = MT25TL01G_QPI_MODE;
init.TransferRate = MT25TL01G_DTR_TRANSFER;
init.DualFlashMode = MT25TL01G_DUALFLASH_DISABLE;
if (BSP_QSPI_Init(0, &init) != BSP_ERROR_NONE)
{
Error_Handler();
}
/* USER CODE END QUADSPI_Init 2 */
