AM2432: XIP and custom flash usage

Part Number: AM2432
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I'm having some issues while using XIP on my company's custom board. We are using a custom flash storage which is listed in the flash selection guide. The flash is working in both application running from flash and RAM, so it seems to be working well so far. However, we have some issues still left to be solved:

 

1) Our board uses internal loopback mode for OSPI. Is it possible to use PHY tuning with internal loopback mode or is external loopback mode required (LBCLKO and DQS pins connected)? XIP is working on our board if we disable PHY and enable DAC in the bootloader, but we would like to know if it's possible to use PHY tuning and use faster clock speeds.

 

2) Is PHY tuning algorithm running frequently or just once in during the device boot when OSPI is opened? Our goal is to run devices for over a long period and operating environment and circumstances may vary during the operation runtime.

 

3) Is it possible to use the same flash, that is used for XIP, to be used on the application side for read/write operations? 

  • Hi Jani,

    1). PHY mode requires external loopback mode or DQS mode, as internal PHY Loopback and Internal Pad Loopback clocking modes with DDR timing are affected by a known errata. For more information on this errata, please refer i2249 errata. The following clocking topologies are currently supported:

    2). With the release of MCU+ SDK 11.02, a new feature called Validate OTP has been introduced. This feature used for Flash reads, re-runs the PHY Tuning algorithm if OTP validation fails, taking into account varying operating environments and circumstances. Additionally, PHY can be enabled in the bootloader, as the Secondary Boot Loader (SBL) only reads the DM app image and does not perform any write operations, and we have PHY mode supported for read operations.

    3). Yes, the same flash can be used on the application side for read/write operations. Please refer the OSPI Flash XIP example and OSPI Flash IO example.

  • Hi Aryamaan,

    Thanks for you reply! I have some follow-up questions:

    1) Our flash is using SDR mode (1S-1S-4S) and we have configured input clock frequency to 133MHz. Does the errata also affect on SDR modes or just DDR modes? After flashing PHY- tuning data into flash, I've been able to use PHY mode. And based on my tests, toggling PHY enable/disable switch in sysconfig has impact on the XIP performance. I'm just wondering whether it's sufficient to use PHY mode with internal loopback with our current configuration and without any external connections.

    2) Thanks for the information! I'll take a look on that.

    3) I tried to look into OSPI Flash XIP example but that seem to place all the code to MSRAM instead of FLASH. It didn't seem to work when I tried putting all the code and read-only data to FLASH. On our application side, I tried to put all driver initialization code to RAM but the first code address to be loaded from the flash seem to fail (after initialization). Is it supported to place executable code on the flash, initialize flash in SBL and perform read/write operations on the flash on the application side?

    section3.$name                        = "Code and Read-Only Data";
    section3.load_memory                  = "FLASH";
    section3.output_section.create(2);
    section3.output_section[0].$name      = ".text";
    section3.output_section[0].palignment = true;
    section3.output_section[1].$name      = ".rodata";
    section3.output_section[1].palignment = true;

    -Jani

  • Hi Jani,

    1). Yes, you can use PHY mode with internal loopback with your current configuration, since the flash is using SDR mode, and there is no errata for SDR mode.

    3). Allow me some time to get back to you regarding whether placing the executable code(that uses ospi and flash drivers) on the flash is supported.

    Regards,

    Aryamaan Chaurasia

  • Hi Jani,

    3). The executable code that contains only non-critical code with read-only data can be stored in Flash memory. Code including Flash operations must be executed from MSRAM, and cannot be stored in Flash memory for XIP.

    Regards,

    Aryamaan Chaurasia 

  • Hi Aryamaan,

    Thanks for your responses! These replies helped us to figure out our issues.

    -Jani