samples: drivers: memc: support PSRAM on RW612 while using XIP mode
RW612 has one FLEXSPI controller, which is capable of supporting
multiple external devices on one board. However, care must be taken when
configuring the FLEXSPI to use multiple devices, as if the FLEXSPI is
configured incorrectly in XIP mode it will fail to read from the
external flash, and the chip will crash.
Make the following changes to the RW configuration for the MEMC sample,
in order to support executing from flash while accessing PSRAM:
- initialize the FLEXSPI MEMC driver first, before the flash or PSRAM
drivers are initialized
- force the FLEXSPI MEMC driver to reconfigure the FLEXSPI at boot, so
we can configure the DQS sampling mode for the PSRAM on port B
- only configure the PSRAM pins during FLEXSPI init, so XIP is not
disrupted
- configure the flash device at boot. This is required so that the MEMC
driver will not replace the LUTs programmed in the FLEXSPI by the
bootrom, as it would otherwise not be aware of their existence.
Signed-off-by:
Daniel DeGrasse <daniel.degrasse@nxp.com>
Loading
Please sign in to comment