AnsweredAssumed Answered

RT1052 & W25Q512 QSPI FLASH - not getting full memory access

Question asked by variable_andrew on May 18, 2020
Latest reply on May 21, 2020 by variable_andrew

What do I need to do in order to fully get access to ALL 64MB of the W25Q512 w/ the RT1052 (it appears I'm only getting 16MB of addressable memory)?

 

I actually have it working, but I only have access to address 0x6000_0000 - 0x60FF_FFFF, then it appears that the same data is provided back when I go to 0x6100_0000.

 

ie - I write the following data to 0x63c0_0000:

and then I read 0x62c0_0000, which hasn't been written, so should be all 0xFFFFFFFF's, but it reads back the exact same as 0x63c0_0000 -

 

 

In MCUXpresso Project settings -> MCU Settings: I dont see a .cfx flash driver for the W25Q512 part, so right now I'm using the following LinServer flash driver: MIMXRT1050_SFDP_QSPI.cfx (and updating Size to 0x4000000)

Could this be causing me problems? Where can I get the right cfx file?

 

In board.h - updated

#define BOARD_FLASH_SIZE (0x4000000)

In board.c - MPU setup -

/* Region 1 setting: Memory with Device type, not shareable, non-cacheable. */
MPU->RBAR = ARM_MPU_RBAR(1, 0x60000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB);

#if defined(XIP_EXTERNAL_FLASH) && (XIP_EXTERNAL_FLASH == 1)
/* Region 2 setting: Memory with Normal type, not shareable, outer/inner write back. */
MPU->RBAR = ARM_MPU_RBAR(2, 0x60000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_RO, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64MB);
#endif

 

 

I've updated evkmimxrt1050_flexspi_nor_config.c/h as per Debug and Execute Code from FLASH on the Seeed Arch Mix NXP i.MX RT1052 Board | MCU on Eclipse   and then updated sflashA1Size to 64MB...

 

What else might I be missing?

Outcomes