Hi!!
My team and I are developing a project with the SLN-SVUI-IOT board. We're using the external flash memory to store the application, but we also want to use a part of it to store some files. We currently have a working application that uses WiFi, UART and LPSPI. Now, I'm trying to integrate the usage of the flash memory to read files. I'm using the sln_svui_local_demo example as a base, but the program keeps crashing in the FLEXSPI_Init function, so I guess there is something in the configurations I am missing.
Is there any tutorial for flash configuration so it can be used as described?
============================================================
Additionally, here is some context. This is my main function:
int main(void) {
/* Enable additional fault handlers */
SCB->SHCSR |= (SCB_SHCSR_BUSFAULTENA_Msk
| /*SCB_SHCSR_USGFAULTENA_Msk |*/SCB_SHCSR_MEMFAULTENA_Msk);
/* Relocate Vector Table */
#if RELOCATE_VECTOR_TABLE
BOARD_RelocateVectorTableToRam();
#endif
/* Init board hardware. */
BOARD_ConfigMPU();
BOARD_InitBootPins();
BOARD_InitBootClocks();
#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL
/* Init FSL debug console. */
BOARD_InitDebugConsole();
#endif
/* Initialize Flash to allow writing */
SLN_Flash_Init();
if (SLN_FLASH_FS_OK != sln_flash_fs_ops_init(false)) {
PRINTF(("ERROR: littlefs init failed!\r\n"));
}
xTaskCreate(read_file_task, "Read_Task", 512, NULL,
configMAX_PRIORITIES - 4, &appTaskHandle);
/* Run RTOS */
vTaskStartScheduler();
while (1) {
}
return 0;
}
#endif
it crashes during SLN_Flash_Init();
I attached config files where are located the functions called before SLN_Flash_Init();
I also added these flags into compiler preprocessor settings:
XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1
XIP_BOOT_HEADER_DCD_ENABLE=1