AM263P4-Q1: How to Dynamically Enable/Disable OSPI DMA at Runtime

Part Number: AM263P4-Q1
Other Parts Discussed in Thread: SYSCONFIG

I have a question regarding the AM263Px MCU+SDK (mcu_plus_sdk_am263px_10_01_00_31).

In our project, OSPI DMA is enabled via SysConfig. However, we would like to disable OSPI DMA when RAT is enabled. Is there a way to enable/disable OSPI DMA at runtime without closing and re-opening the OSPI driver (i.e., without OSPI_close() → OSPI_open())?

As a reference, we are also considering modifying dmaEnable in the OSPI attributes (OSPI_Attrs), but this would require casting away const. Is this supported and/or recommended?
((OSPI_Attrs *)gOspiConfig[CONFIG_OSPI0].attrs)->dmaEnable = FALSE;

Requested response date: June 28, 2026

  • I have an additional question related to the above.

    We are using RAT because we want to switch the source application image when SBL loads the application image from OSPI Flash. Specifically, we would like to load the application from one of the following locations:

    Side A: 0x60081000
    Side B: 0x60881000

    At the moment, in the SysCfg BOOTLOADER configuration, the Boot Image Offset appears to be fixed at “0x60081000”.

    Question:
    Other than using RAT, is there a way to dynamically switch the source address of the application image while SBL is running?
    In order to switch the source dynamically, we tried changing the source address during SBL execution using the following approach before calling Bootloader_parseMultiCoreAppImage, and it appears to work correctly. Is this method recommended and/or supported?

     gBootloader0Args.appImageOffset = 0x00881000;

    Requested response date: July 1, 2026

  • Hi Imaoka-San,

    Apologies for the delay as I was OOO.

    You could consider this method as this factor determines whether the driver needs to use DMA or not.  

    ((OSPI_Attrs *)gOspiConfig[CONFIG_OSPI0].attrs)->dmaEnable = FALSE;

    In 10.1 SDK, I would recommend that if using this method, then change the dmaEnable factor in all of the structures. That is the dmaEnable field is present in OSPILLD_InitHandle,  OSPI_Attrs and OSPILLD_InitObject.

    Also, if DMA is off, we are doing just a memcpy in the driver, so a memcpy can be done from the application as well. This would be recommended as the previous method is not tested and we would need to ensure that dmaEnable in all structures are always aligned.

    Thanks & Regards,

    Aswin

  • Hi Imaoka-San,

    Other than using RAT, is there a way to dynamically switch the source address of the application image while SBL is running?
    In order to switch the source dynamically, we tried changing the source address during SBL execution using the following approach before calling Bootloader_parseMultiCoreAppImage, and it appears to work correctly. Is this method recommended and/or supported?

    There is always the option of AB Swap which is recommended for such usecases. 

    The ideas of changing gBootloader0Args.appImageOffset should also be fine. This is equivalent to changing the address offset in sysconfig. 

    Changing the addressoffset of changed the appImageOffset.

    Thanks & Regards,

    Aswin