Hi everyone,
i try to setup a own NOR Flash example via FlexSPI on the i.MXRT1170 EVK board. As template i use one of the SDK examples "freertos_hello_flash_operation_cm7".
In contrast to the SDK example i want to use the build in MCUXpresso Config tool at the IDE to configure FlexSPI. If i debug my project the debugger disappers after the "FLEXSPI_Init" at the "BOARD_InitPeripherals" section. Why does that happen?
Did i forget to initalize something for the FLEXSPI at the MCUXpresso Config tool or is there an additional configruation?
PS: If i set the configuration of FLEXSPI to "Custom" (Default) the same problem occurs
Looking forward for some answers!
Thank you!
Best Regards
Berni
Hi Berni,
Are you using a custom LUT?
We went down that path as well, and discovered that when we used a custom LUT, the generated code for FLEXSPI_init() is incorrect.
The problem is that the LUT can only be modified when MCRn[MDIS] is cleared. Here is the description of MDIS from the Reference Manual.
"When module disabled, AHB/serial clock will be gated off internally to save power. Only register access
(except LUT/IP RX FIFO/IP TX FIFO) is allowed."
To fix, swap the calls so the order is: (1) FLEXSPI_Init (2) FLEXSPI_SetFlashConfig (3) FLEXSPI_UpdateLUT. This ensures FLEXSPI_UpdateLUT is called after MDIS is cleared.
jaredm