This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2431: Software reset

Part Number: AM2431
Other Parts Discussed in Thread: UNIFLASH,

Hi all TI experts,

I am currently developing the functionality for firmware updates. I have completed both my bootloader and application. The bootloader was developed by modifying the example code of sbl_ospi. The firmware is stored in external flash and communicates via the OSPI interface.

I can now receive firmware through the application and store it in the external flash. The bootloader can then copy the firmware to be updated from the external flash and place it in the application's location. However, I am unable to execute a software reset within the firmware. All the above operations were completed by manually turning the power on and off. I have found the following two methods to perform a software reset:

  1. Writing specific values to the following registers to execute a software reset:

    • 0x43019008 <- 0x68ef3490
    • 0x4301900c <- 0xd172bc5a
    • 0x43018170 <- 0x06
  2. Using the SOC_generateSwWarmResetMainDomain() function.

However, neither method has successfully triggered a software reset. Could you advise if there are other correct ways to accomplish this?

Best,

Larry

  • Hello Larry,

    Thanks for reaching out to Texas Instruments E2E support forum.

    Our domain expert is out today so responses will be delayed. Please expect a reply in a day or two.

    Regards,

    Tushar

  • Hello Larry,

    The new updated firmware is received through Application and keeps it in external flash.

    So, now you need to reset the SOC so that SBL will try to load and run new Applications on SOC.

    In 64X/243, Reset operations will be controlled by the DMSC core. So, you don't need to control any Registers to make SOC Reset.

    Please use the below function to reset the SOC.

    Sciclient_pmDeviceReset ( ).

    I clearly explained what the registers will affect if we call the above API.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1237209/faq-am64x-how-to-reset-warm-reset-the-soc-from-software/4675314?tisearch=e2e-sitesearch&keymatch=Sciclient_pmDeviceReset#4675314

    Please let me know if you have any Isolating MCU core from MAIN Domain feature in your Application.

    Regards,

    S.Anil.

  • Hi Swargam,

    Thank you for your detailed reply. Regarding the function: Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER), I have already tested it. The behavior of this function is the same as the modifications to the register contents I mentioned above, as shown below:

    • 0x43019008 <- 0x68ef3490
    • 0x4301900c <- 0xd172bc5a
    • 0x43018170 <- 0x06

    However, this function still does not allow my firmware to reboot from the SBL. After executing this function in the application, I cannot see the SBL startup logs. Could there be another reason for this?

    My SBL is modified from SDK/examples/drivers/boot/sbl_ospi. Could it be possible that the Bootloader_socWaitForFWBoot() at the beginning is causing a blockage? Is the SoC not receiving signals from the MCU?

    Best,

    Larry

  • Hello Larry ,

    After calling the above API, SOC Reset operation has been done. 

    After that, the code boot flow will be as below: 

    RESET → RBL → SBL → Application.

    Still, you are not able to see any logs on the SBL, then your code might be get stuck in on SBL.

    You can try to debug SBL code with the below approach 

    Add the function loop_forever() just after entering the main() and compile the SBL .

    Send this this binary to SOC over the UART UNIFLASH tool in UART boot mode.

    Next, Connect Target to R50_0 (SBL runs only on R50_0 core).

    The program which needs to be debugged is already loaded on the device. Load the symbols an debug further .

    Can you please confirm which type of images are flashing in the external OSPI ? Is it app image or rprc images during Application Running ?

    Can you please confirm updated firmware is whether running or not when you transfer through the UART UNIFLASH ?

    Regards,

    S.Anil.

  • Hi Swargam,

    What do you mean by 'Load the symbols'? Does this action of 'loading the symbols' simulate a warm reset?"

    1. The image I updated is compiled and generated in the Debug folder as project_name.appimage.hs_fs.
    2. I can confirm that my updated firmware is operational because it differs from the application I was originally running only in the content of one log, which allows me to identify it. I have indeed updated the firmware via uart uniflash and have it running on the AM2431.

    Best,

    Larry

  • Hello Larry,

    If a new app is running from UART uniflash , then your app image does not have issues.

    Can you please confirm where your SBL gets stuck ? by using the below FAQ you can debug SBL . After your testing,   we can get some insights in your testing about exactly where SBl gets stuck to debug the issue further .

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1119575/faq-mcu-plus-sdk-am243x-how-to-debug-sbl_qspi-for-am263-and-am273-or-sbl_ospi-for-am243-or-an-application-which-is-booted-via-ospi-qspi-boot

    Regards,

    S.Anil.

  • Hi Swargam,

    However, if I insert a while loop at the very beginning of the SBL, the SBL will not be able to proceed to the application, and thus I won't be able to perform a warm reset. With these different conditions, is it still possible to replicate the same issue? It seems logically inconsistent, doesn't it?

    Best,

    Larry

  • Hello Larry,

    Debugging SBL  code is very simple. You should follow simple steps as per above FAQ.

    You don't need to reset any device since already updated firmware is available on external memory. Your code hangs in the SBL at while(1) condition now connect debugger and load the symbols as per FAQ. Next, come out from this while(1) condition and debug further  where the SBL code gets hang. 

    If you have a project, please share it with me. I can debug further since starting to implement your requirements from scratch. It will take time for me.

    Regards,

    S.Anil.

  • Hi Swargam,

    I apologize for the inconvenience, as I've been busy with other work over the past few days. Today, I incorporated the while(flg) loop into the SBL for testing purposes. Here is a detailed explanation of my testing procedure:

    1. I flashed the SBL and application onto the AM2431 using uart_uniflash.
    2. After re-powering, the AM2431 restarted.
    3. By loading symbols through CCS, I observed that the program halted at 0x70003524, as shown in the image below, confirming that it was stuck in the while loop within the SBL.
    4. I modified the flag condition in the while loop to allow it to exit.
    5. The program successfully completed the SBL logic and transitioned to the application.
    6. Upon initialization completion by the application, it executed the update firmware, followed by Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER).
    7. Then, reloading symbols through CCS showed the program stopping at 0x418019F0.

    At this point, I was unable to proceed further with debugging. Even attempting to load symbols didn't clarify where the program execution had halted. It appears the program ventured into an unknown location, possibly indicating that Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER) did not correctly restart the AM2431, disrupting the intended RESET → RBL → SBL process, and causing the program to run into an unexpected location. Could it be that I used the wrong function?

    Best,

    Larry

  • Hello Larry,

    I apologize for the inconvenience, as I've been busy with other work over the past few days. Today, I incorporated the while(flg) loop into the SBL for testing purposes. Here is a detailed explanation of my testing procedure:

    1. I flashed the SBL and application onto the AM2431 using uart_uniflash.
    2. After re-powering, the AM2431 restarted.
    3. By loading symbols through CCS, I observed that the program halted at 0x70003524, as shown in the image below, confirming that it was stuck in the while loop within the SBL.
    4. I modified the flag condition in the while loop to allow it to exit.
    5. The program successfully completed the SBL logic and transitioned to the application.
    6. Upon initialization completion by the application, it executed the update firmware

    Till the 6th point, I understand that your firmware is updated and running and there are no issues.

    After some time, you given , Sciclient_pmDeviceReset to make SOC , then SOC gets into a halt state.

    I am assumed that your code got stuck in SBL, Since this address belongs to the ROM address.

    Is it possible to share your Application and SBL to debug the issue further on my side ?

    Did you check with the API below to make SOC Reset ? You did not face any issues ?

    SOC_generateSwWarmResetMainDomain

    Regards,

    S.Anil.

  • Hi Swargam,

    Yes, I have tried this command, including attempting the functions in MCUDomain, and they all lead to the same address.

    Could you provide your email to me? I attempted to compress my project for upload, but the file might be too large to upload here.

    Best,

    Larry

  • Hello Larry,

    If you share reproducible code on EVM, it is really helpful.

    If you share your customer project it will take more time to analyse the issue.

    Please try to give reproducible code on EVM and attach them to the same in the thread.

    Regards,

    S.Anil.

  • Hi Swargam,

    I'll give it a try. Below is my SBL code, which is essentially modified from the sbl_ospi example. I've removed the update firmware part, retaining only the most basic SBL functionalities, and I can confirm that this can replicate the issue.

    /*
     *  Copyright (C) 2018-2022 Texas Instruments Incorporated
     *
     *  Redistribution and use in source and binary forms, with or without
     *  modification, are permitted provided that the following conditions
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    #include <stdlib.h>
    #include "ti_drivers_config.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    #include <drivers/sciclient.h>
    #include <drivers/bootloader.h>
    
    #include "local_flash_control.h"
    
    /*----------------------------------------------------------------------------*/
    /* Defines -------------------------------------------------------------------*/
    /*----------------------------------------------------------------------------*/
    #define LOCAL_FLASH_PAGE_SIZE           (256)
    #define LOCAL_FLASH_SECTOR_SIZE         (4096)
    #define LOCAL_FLASH_BLOCK_SIZE          (65536)
    
    #define APPLICATION_FIRMWARE_ADDRESS    (0x80000)
    #define UPDATE_FIRMWARE_ADDRESS         (0x120000)
    #define UPDATE_FIRMWARE_SPACE_SIZE      (0xA0000)
    #define UPDATE_FIRMWARE_MAGIC_NUMBER    (0x1C0000)
    
    /******************************************************************************/
    /* Flash partition ************************************************************/
    /******************************************************************************/
    //---------0x00 0000-----------------------------------
    //-----------------------------------------------------
    //---------Boot loader, size: 0x8 0000-----------------
    //-----------------------------------------------------
    //---------0x07 FFFF-----------------------------------
    
    //---------0x08 0000-----------------------------------
    //-----------------------------------------------------
    //---------Application, size: 0xA 0000-----------------
    //-----------------------------------------------------
    //---------0x11 FFFF-----------------------------------
    
    //---------0x12 0000-----------------------------------
    //-----------------------------------------------------
    //-------Update FW space, size: 0xA 0000---------------
    //-----------------------------------------------------
    //---------0x1B FFFF-----------------------------------
    
    //---------0x1C 0000-----------------------------------
    //-----------------------------------------------------
    //-------Reserve, size: 0x4 0000----------------------
    //-----------------------------------------------------
    //---------0x1F FFFF-----------------------------------
    
    /*----------------------------------------------------------------------------*/
    /* Static variable definitions -----------------------------------------------*/
    /*----------------------------------------------------------------------------*/
    static uint8_t magicNumberUpdateComplete[32] = {0};
    
    uint8_t updateFileBuf[LOCAL_FLASH_PAGE_SIZE] __attribute__((aligned(128), section(".bss.filebuf")));
    /*----------------------------------------------------------------------------*/
    /* Static function declarations ----------------------------------------------*/
    /*----------------------------------------------------------------------------*/
    static void clone_app();
    
    /*----------------------------------------------------------------------------*/
    /* Main function definition --------------------------------------------------*/
    /*----------------------------------------------------------------------------*/
    /* call this API to stop the booting process and spin, do that you can connect
     * debugger, load symbols and then make the 'loop' variable as 0 to continue execution
     * with debugger connected.
     */
    void loop_forever(void)
    {
        volatile uint32_t loop = 1;
        while(loop)
            ;
    }
    
    int main(void)
    {
        int32_t status;
        
        loop_forever();
    
        Bootloader_profileReset();
    
        Bootloader_socWaitForFWBoot();
    
    #ifndef DISABLE_WARM_REST_WA
        /* Warm Reset Workaround to prevent CPSW register lockup */
        if (!Bootloader_socIsMCUResetIsoEnabled())
        {
            Bootloader_socResetWorkaround();
        }
    #endif
    
        Bootloader_profileAddProfilePoint("SYSFW init");
    
        if (!Bootloader_socIsMCUResetIsoEnabled())
        {
            /* Update devGrp to ALL to initialize MCU domain when reset isolation is
            not enabled */
            Sciclient_BoardCfgPrms_t boardCfgPrms_pm =
                {
                    .boardConfigLow = (uint32_t)0,
                    .boardConfigHigh = 0,
                    .boardConfigSize = 0,
                    .devGrp = DEVGRP_ALL,
                };
    
            status = Sciclient_boardCfgPm(&boardCfgPrms_pm);
    
            /* Enable MCU PLL. MCU PLL will not be enabled by DMSC when devGrp is set
            to Main in boardCfg */
            Bootloader_enableMCUPLL();
        }
    
        Bootloader_socOpenFirewalls();
    
        Bootloader_socNotifyFirewallOpen();
    
        System_init();
        Bootloader_profileAddProfilePoint("System_init");
    
        Drivers_open();
        Bootloader_profileAddProfilePoint("Drivers_open");
    
        #if 1
        DebugP_log("\r\n");
        DebugP_log("Starting OSPI Bootloader ... \r\n");
        #endif
    
        status = Board_driversOpen();
        DebugP_assert(status == SystemP_SUCCESS);
        Bootloader_profileAddProfilePoint("Board_driversOpen");
    
        status = Sciclient_getVersionCheck(1);
        Bootloader_profileAddProfilePoint("Sciclient Get Version");
        if(SystemP_SUCCESS == status)
        {
            Bootloader_BootImageInfo bootImageInfo;
            Bootloader_Params bootParams;
            Bootloader_Handle bootHandle;
    
            Bootloader_Params_init(&bootParams);
            Bootloader_BootImageInfo_init(&bootImageInfo);
    
            bootHandle = Bootloader_open(CONFIG_BOOTLOADER_FLASH0, &bootParams);
            if(bootHandle != NULL)
            {
                status = Bootloader_parseMultiCoreAppImage(bootHandle, &bootImageInfo);
                /* Load CPUs */
                /* Do not load M4 when MCU domain is reset isolated */
                if (!Bootloader_socIsMCUResetIsoEnabled())
                {
                    if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_M4FSS0_0)))
                    {
                        bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_M4FSS0_0);
                        Bootloader_profileAddCore(CSL_CORE_ID_M4FSS0_0);
                        status = Bootloader_loadCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0]);
                    }
                }
    
                /* Assume self boot for either of the cores of R50 cluster */
                uint32_t isSelfBoot = FALSE;
                if(TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_R5FSS0_0))
                {
                    isSelfBoot = TRUE;
                    Bootloader_profileAddCore(CSL_CORE_ID_R5FSS0_0);
                }
    
                /* Self cores has to be reset together, so check for both */
                if(status == SystemP_SUCCESS && (TRUE == isSelfBoot))
                {
                    /* Set clocks for self cluster */
                    bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS0_0);
                    //bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_1].clkHz = Bootloader_socCpuGetClkDefault(CSL_CORE_ID_R5FSS0_1);
    
                    /* Reset self cluster, both Core0 and Core 1. Init RAMs and load the app  */
                    status = Bootloader_loadSelfCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_0]);
                    if(status == SystemP_SUCCESS)
                    {
                        //status = Bootloader_loadSelfCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_1]);
                    }
                }
                Bootloader_profileAddProfilePoint("CPU load");
                Bootloader_profileUpdateAppimageSize(Bootloader_getMulticoreImageSize(bootHandle));
                Bootloader_profileUpdateMediaAndClk(BOOTLOADER_MEDIA_FLASH, OSPI_getInputClk(gOspiHandle[CONFIG_OSPI0]));
    
                #if 1
                if( status == SystemP_SUCCESS)
                {
                    /* enable Phy and Phy pipeline for XIP execution */
                    if( OSPI_isPhyEnable(gOspiHandle[CONFIG_OSPI0]) )
                    {
                        status = OSPI_enablePhy(gOspiHandle[CONFIG_OSPI0]);
                        DebugP_assert(status == SystemP_SUCCESS);
    
                        status = OSPI_enablePhyPipeline(gOspiHandle[CONFIG_OSPI0]);
                        DebugP_assert(status == SystemP_SUCCESS);
                    }
                }
                #endif
    
                if(status == SystemP_SUCCESS)
                {
    
                    /* Print SBL Profiling logs to UART as other cores may use the UART for logging */
                    Bootloader_profileAddProfilePoint("SBL End");
                    Bootloader_profilePrintProfileLog();
                    DebugP_log("Image loading done, switching to application ...\r\n");
                    UART_flushTxFifo(gUartHandle[CONFIG_UART0]);
                }
    
                /* Run CPUs */
                /* Do not run M4 when MCU domain is reset isolated */
                if (!Bootloader_socIsMCUResetIsoEnabled())
                {
                    if(status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(bootHandle, CSL_CORE_ID_M4FSS0_0)))
                    {
                        status = Bootloader_runCpu(bootHandle, &bootImageInfo.cpuInfo[CSL_CORE_ID_M4FSS0_0]);
                    }
                }
    
                if(status == SystemP_SUCCESS && (TRUE == isSelfBoot))
                {
                    /* Reset self cluster, both Core0 and Core 1. Init RAMs and run the app  */
                    status = Bootloader_runSelfCpu(bootHandle, &bootImageInfo);
                }
                /* it should not return here, if it does, then there was some error */
                Bootloader_close(bootHandle);
            }
        }
        if(status != SystemP_SUCCESS )
        {
            DebugP_log("Some tests have failed!!\r\n");
        }
        Drivers_close();
        System_deinit();
    
        return 0;
    }
    

    Below is a part of my application code, which simply executes Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER) after a certain period of time following startup.

    #include <stdlib.h>
    #include <kernel/dpl/DebugP.h>
    #include "ti_drivers_config.h"
    #include "ti_board_config.h"
    #include "FreeRTOS.h"
    #include "task.h"
    #include "ti_drivers_open_close.h"
    #include "ti_board_open_close.h"
    
    #include <FreeRTOS.h>
    #include <task.h>
    #include <semphr.h>
    #include <queue.h>
    
    #define MAIN_TASK_PRI  (configMAX_PRIORITIES-1)
    
    #define PERIPHERAL_TASK_SIZE (10240U/sizeof(configSTACK_DEPTH_TYPE))
    
    StackType_t gPeripheralTaskStack[PERIPHERAL_TASK_SIZE] __attribute__((aligned(32)));
    
    StaticTask_t gPeripheralTaskObj;
    TaskHandle_t gPeripheralTask;
    
    void test_task_main(void)
    {
        Drivers_open();
        Board_driversOpen();
    
        EnetAppUtils_print("test main init complete\r\n");
        vTaskDelay(100);
        Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER);
    
        for(;;)
        {
    
        }
    }
    
    void freertos_test_main(void *args)
    {
        test_task_main();
    
        vTaskDelete(NULL);
    }
    
    int main(void)
    {
        System_init();
        Board_init();
    
        gPeripheralTask = xTaskCreateStatic( freertos_test_main,   /* Pointer to the function that implements the task. */
                                            "freertos_test_main", /* Text name for the task.  This is to facilitate debugging only. */
                                            PERIPHERAL_TASK_SIZE,  /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
                                            NULL,            /* We are not using the task parameter. */
                                            MAIN_TASK_PRI,   /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
                                            gPeripheralTaskStack,  /* pointer to stack base */
                                            &gPeripheralTaskObj ); /* pointer to statically allocated task object memory */
        configASSERT(gPeripheralTask != NULL);
    
    
        //ethernetReceiveTask_init();
    
        vTaskStartScheduler();
    
        Board_deinit();
        System_deinit();
    
        return 0;
    }
    

    Best,

    Larry

  • Hi Swargam,

    Any updates?

    Best,

    Larry

  • Hello Larry,

    Sorry I am not able to check your problem as I was involved in other customer issue escalations.

    Hopefully, I can check in next week.

    Meantime, please provide your system cfg files of both SBL and Application projects.

    Regards,

    S.Anil.

  • Hi Swargam,

    Sure!

    Below is my SBL systme cfg.

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@08.05.00"
     * @versions {"tool":"1.14.0+2667"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const flash       = scripting.addModule("/board/flash/flash", {}, false);
    const flash1      = flash.addInstance();
    const bootloader  = scripting.addModule("/drivers/bootloader/bootloader", {}, false);
    const bootloader1 = bootloader.addInstance();
    const debug_log   = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7   = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71  = mpu_armv7.addInstance();
    const mpu_armv72  = mpu_armv7.addInstance();
    const mpu_armv73  = mpu_armv7.addInstance();
    const mpu_armv74  = mpu_armv7.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    bootloader1.appImageOffset      = "0x80000";
    bootloader1.$name               = "CONFIG_BOOTLOADER_FLASH0";
    bootloader1.appImageBaseAddress = "0x60080000";
    
    flash1.$name                      = "CONFIG_FLASH0";
    bootloader1.flashDriver           = flash1;
    flash1.flashSize                  = 2097152;
    flash1.flashManfId                = "0xEF";
    flash1.flashDeviceId              = "0x4015";
    flash1.flashBlockSize             = 65536;
    flash1.cmdBlockErase4B            = "0xD8";
    flash1.cmdSectorErase4B           = "0x20";
    flash1.cmdRd                      = "0xEB";
    flash1.modeClksRd                 = 2;
    flash1.dummyClksRd                = 0;
    flash1.flash444Seq                = "0x11";
    flash1.dummy_isAddrReg            = false;
    flash1.dummy_cmdRegRd             = "0x00";
    flash1.dummy_cmdRegWr             = "0x00";
    flash1.dummy_mask                 = "0x00";
    flash1.dummy_bitP                 = 0;
    flash1.resetType                  = "0x30";
    flash1.idNumBytes                 = 5;
    flash1.addressByteSupport         = "0";
    flash1.protocol                   = "4s_4s_4s";
    flash1.flashQeType                = "4";
    flash1.peripheralDriver.$name     = "CONFIG_OSPI0";
    flash1.peripheralDriver.dmaEnable = true;
    
    const udma                         = scripting.addModule("/drivers/udma/udma", {}, false);
    const udma1                        = udma.addInstance({}, false);
    udma1.$name                        = "CONFIG_UDMA0";
    flash1.peripheralDriver.udmaDriver = udma1;
    
    debug_log.enableUartLog        = true;
    debug_log.enableCssLog         = false;
    debug_log.uartLog.$name        = "CONFIG_UART0";
    debug_log.uartLog.intrEnable   = "DISABLE";
    debug_log.uartLog.UART.$assign = "USART0";
    
    mpu_armv71.$name             = "CONFIG_MPU_REGION0";
    mpu_armv71.size              = 31;
    mpu_armv71.attributes        = "Device";
    mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv71.allowExecute      = false;
    
    mpu_armv72.$name             = "CONFIG_MPU_REGION1";
    mpu_armv72.size              = 15;
    mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv73.$name             = "CONFIG_MPU_REGION2";
    mpu_armv73.baseAddr          = 0x41010000;
    mpu_armv73.size              = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv74.$name             = "CONFIG_MPU_REGION3";
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.baseAddr          = 0x70000000;
    mpu_armv74.size              = 21;
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    flash1.peripheralDriver.OSPI.$suggestSolution      = "OSPI0";
    flash1.peripheralDriver.OSPI.CLK.$suggestSolution  = "ball.P20";
    flash1.peripheralDriver.OSPI.CSn0.$suggestSolution = "ball.L20";
    flash1.peripheralDriver.OSPI.D3.$suggestSolution   = "ball.N19";
    flash1.peripheralDriver.OSPI.D2.$suggestSolution   = "ball.L21";
    flash1.peripheralDriver.OSPI.D1.$suggestSolution   = "ball.N20";
    flash1.peripheralDriver.OSPI.D0.$suggestSolution   = "ball.L19";
    debug_log.uartLog.UART.RXD.$suggestSolution        = "ball.B10";
    debug_log.uartLog.UART.TXD.$suggestSolution        = "ball.B11";
    

    Below is my application system cfg.

    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM243x@09.00.00"
     * @versions {"tool":"1.17.0+3128"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const eeprom          = scripting.addModule("/board/eeprom/eeprom", {}, false);
    const eeprom1         = eeprom.addInstance();
    const flash           = scripting.addModule("/board/flash/flash", {}, false);
    const flash1          = flash.addInstance();
    const epwm            = scripting.addModule("/drivers/epwm/epwm", {}, false);
    const epwm1           = epwm.addInstance();
    const epwm2           = epwm.addInstance();
    const epwm3           = epwm.addInstance();
    const epwm4           = epwm.addInstance();
    const epwm5           = epwm.addInstance();
    const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
    const gpio1           = gpio.addInstance();
    const gpio2           = gpio.addInstance();
    const gpio3           = gpio.addInstance();
    const gpio4           = gpio.addInstance();
    const gpio5           = gpio.addInstance();
    const gpio6           = gpio.addInstance();
    const gpio7           = gpio.addInstance();
    const gpio8           = gpio.addInstance();
    const gpio9           = gpio.addInstance();
    const gpio10          = gpio.addInstance();
    const gpio11          = gpio.addInstance();
    const gpio12          = gpio.addInstance();
    const gpio13          = gpio.addInstance();
    const gpio14          = gpio.addInstance();
    const gpio15          = gpio.addInstance();
    const gpio16          = gpio.addInstance();
    const gpio17          = gpio.addInstance();
    const gpio18          = gpio.addInstance();
    const gpio19          = gpio.addInstance();
    const gpio20          = gpio.addInstance();
    const gpio21          = gpio.addInstance();
    const gpio22          = gpio.addInstance();
    const gpio23          = gpio.addInstance();
    const gpio24          = gpio.addInstance();
    const gpio25          = gpio.addInstance();
    const gpio26          = gpio.addInstance();
    const gpio27          = gpio.addInstance();
    const gpio28          = gpio.addInstance();
    const gpio29          = gpio.addInstance();
    const i2c             = scripting.addModule("/drivers/i2c/i2c", {}, false);
    const i2c1            = i2c.addInstance();
    const mcspi           = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
    const mcspi1          = mcspi.addInstance();
    const pruicss         = scripting.addModule("/drivers/pruicss/pruicss", {}, false);
    const pruicss1        = pruicss.addInstance();
    const udma            = scripting.addModule("/drivers/udma/udma", {}, false);
    const udma1           = udma.addInstance();
    const addr_translate  = scripting.addModule("/kernel/dpl/addr_translate", {}, false);
    const addr_translate1 = addr_translate.addInstance();
    const clock           = scripting.addModule("/kernel/dpl/clock");
    const debug_log       = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7       = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71      = mpu_armv7.addInstance();
    const mpu_armv72      = mpu_armv7.addInstance();
    const mpu_armv73      = mpu_armv7.addInstance();
    const mpu_armv74      = mpu_armv7.addInstance();
    const mpu_armv75      = mpu_armv7.addInstance();
    const enet_cpsw       = scripting.addModule("/networking/enet_cpsw/enet_cpsw", {}, false);
    const enet_cpsw1      = enet_cpsw.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    eeprom1.$name = "CONFIG_EEPROM0";
    
    flash1.$name                  = "CONFIG_FLASH0";
    flash1.protocol               = "4s_4s_4s";
    flash1.flashSize              = 2097152;
    flash1.flashManfId            = "0xEF";
    flash1.flashDeviceId          = "0x4015";
    flash1.flashBlockSize         = 65536;
    flash1.cmdBlockErase4B        = "0xD8";
    flash1.cmdSectorErase4B       = "0x20";
    flash1.cmdRd                  = "0xEB";
    flash1.modeClksRd             = 2;
    flash1.dummyClksRd            = 0;
    flash1.flashQeType            = "4";
    flash1.flash444Seq            = "0x11";
    flash1.dummy_isAddrReg        = false;
    flash1.dummy_cmdRegRd         = "0x00";
    flash1.dummy_cmdRegWr         = "0x00";
    flash1.dummy_cfgReg           = "0x00000000";
    flash1.dummy_mask             = "0x00";
    flash1.dummy_bitP             = 0;
    flash1.resetType              = "0x30";
    flash1.addressByteSupport     = "0";
    flash1.idNumBytes             = 5;
    flash1.peripheralDriver.$name = "CONFIG_OSPI0";
    
    epwm1.$name            = "ADD0";
    epwm1.EPWM.$assign     = "EHRPWM5";
    epwm1.EPWM.A.$assign   = "GPMC0_BE1n";
    epwm1.EPWM.B.$used     = false;
    epwm1.EPWM.SYNCO.$used = false;
    epwm1.EPWM.SYNCI.rx    = false;
    epwm1.EPWM.SYNCI.$used = false;
    
    epwm2.$name            = "ADD1";
    epwm2.EPWM.$assign     = "EHRPWM3";
    epwm2.EPWM.A.$assign   = "GPMC0_AD13";
    epwm2.EPWM.B.$used     = false;
    epwm2.EPWM.SYNCO.$used = false;
    epwm2.EPWM.SYNCI.$used = false;
    
    epwm3.$name            = "ADD2";
    epwm3.EPWM.$assign     = "EHRPWM2";
    epwm3.EPWM.A.$assign   = "GPMC0_AD8";
    epwm3.EPWM.B.$used     = false;
    epwm3.EPWM.SYNCO.$used = false;
    epwm3.EPWM.SYNCI.$used = false;
    
    epwm4.$name            = "GCLK_GATE";
    epwm4.EPWM.$assign     = "EHRPWM0";
    epwm4.EPWM.A.$assign   = "GPMC0_AD3";
    epwm4.EPWM.B.$used     = false;
    epwm4.EPWM.SYNCO.$used = false;
    epwm4.EPWM.SYNCI.$used = false;
    
    epwm5.$name            = "GCLK_PWM";
    epwm5.EPWM.$assign     = "EHRPWM1";
    epwm5.EPWM.A.$assign   = "GPMC0_AD5";
    epwm5.EPWM.B.$used     = false;
    epwm5.EPWM.SYNCO.$used = false;
    epwm5.EPWM.SYNCI.$used = false;
    
    gpio1.$name                = "UDB1_L";
    gpio1.pinDir               = "OUTPUT";
    gpio1.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO0";
    
    gpio2.$name                = "UDB2_L";
    gpio2.pinDir               = "OUTPUT";
    gpio2.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO1";
    
    gpio3.$name                = "UDGI2_L";
    gpio3.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO2";
    
    gpio4.$name                = "UDBI1_L";
    gpio4.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO3";
    
    gpio5.$name                = "UDG2_L";
    gpio5.pinDir               = "OUTPUT";
    gpio5.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO4";
    
    gpio6.$name                = "UDRI2_L";
    gpio6.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO5";
    
    gpio7.$name                = "UDBI2_L";
    gpio7.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO6";
    
    gpio8.$name                = "UDRI1_L";
    gpio8.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO7";
    
    gpio9.$name                = "UDR2_L";
    gpio9.pinDir               = "OUTPUT";
    gpio9.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO11";
    
    gpio10.$name                = "UDG1_L";
    gpio10.pinDir               = "OUTPUT";
    gpio10.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO12";
    
    gpio11.$name                = "UDR1_L";
    gpio11.pinDir               = "OUTPUT";
    gpio11.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO18";
    
    gpio12.$name                = "UDGI1_L";
    gpio12.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO19";
    
    gpio13.$name                = "ULAT";
    gpio13.pinDir               = "OUTPUT";
    gpio13.GPIO.gpioPin.$assign = "PRG1_PRU1_GPO13";
    
    gpio14.$name                = "STATUS_R";
    gpio14.pinDir               = "OUTPUT";
    gpio14.GPIO.gpioPin.$assign = "PRG0_PRU1_GPO2";
    
    gpio15.$name                = "STATUS_G";
    gpio15.pinDir               = "OUTPUT";
    gpio15.GPIO.gpioPin.$assign = "PRG0_PRU1_GPO3";
    
    gpio16.$name                = "STATUS_B";
    gpio16.pinDir               = "OUTPUT";
    gpio16.GPIO.gpioPin.$assign = "PRG0_PRU1_GPO4";
    
    gpio17.$name                = "UDR2_R";
    gpio17.pinDir               = "OUTPUT";
    gpio17.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO0";
    
    gpio18.$name                = "UDG1_R";
    gpio18.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO1";
    
    gpio19.$name                = "UDB1_R";
    gpio19.pinDir               = "OUTPUT";
    gpio19.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO2";
    
    gpio20.$name                = "UDRI2_R";
    gpio20.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO3";
    
    gpio21.$name                = "UDRI1_R";
    gpio21.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO4";
    
    gpio22.$name                = "UDR1_R";
    gpio22.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO6";
    
    gpio23.$name                = "UDB2_R";
    gpio23.pinDir               = "OUTPUT";
    gpio23.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO11";
    
    gpio24.$name                = "UDG2_R";
    gpio24.pinDir               = "OUTPUT";
    gpio24.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO12";
    
    gpio25.$name                = "UDBI2_R";
    gpio25.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO13";
    
    gpio26.$name                = "UDGI2_R";
    gpio26.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO14";
    
    gpio27.$name                = "UDGI1_R";
    gpio27.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO15";
    
    gpio28.$name                = "UDBI1_R";
    gpio28.GPIO.gpioPin.$assign = "PRG1_PRU0_GPO16";
    
    gpio29.$name                = "UDCLK";
    gpio29.pinDir               = "OUTPUT";
    gpio29.GPIO.gpioPin.$assign = "PRG0_PRU0_GPO10";
    
    i2c1.$name               = "CONFIG_I2C0";
    eeprom1.peripheralDriver = i2c1;
    i2c1.I2C.$assign         = "I2C0";
    
    mcspi1.$name                       = "CONFIG_MCSPI0";
    mcspi1.dpe1                        = "ENABLE";
    mcspi1.dpe0                        = "DISABLE";
    mcspi1.inputSelect                 = "0";
    mcspi1.SPI.$assign                 = "SPI3";
    mcspi1.SPI.CLK.$assign             = "PRG0_PRU0_GPO16";
    mcspi1.SPI.D0.$assign              = "PRG0_PRU0_GPO13";
    mcspi1.SPI.D1.$assign              = "PRG0_PRU0_GPO14";
    mcspi1.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH0";
    mcspi1.mcspiChannel[0].bitRate     = 100000;
    mcspi1.mcspiChannel[0].CSn.$assign = "PRG0_PRU0_GPO17";
    
    pruicss1.$name                           = "CONFIG_PRU_ICSS0";
    pruicss1.AdditionalICSSSettings[0].$name = "CONFIG_PRU_ICSS_IO0";
    
    addr_translate1.$name = "CONFIG_ADDR_TRANSLATE_REGION0";
    
    clock.timerInputClkHz = 800000000;
    
    debug_log.enableUartLog            = true;
    debug_log.uartLog.$name            = "CONFIG_UART1";
    debug_log.uartLog.UART.$assign     = "USART0";
    debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
    debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
    
    mpu_armv71.$name             = "CONFIG_MPU_REGION0";
    mpu_armv71.size              = 31;
    mpu_armv71.attributes        = "Device";
    mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv71.allowExecute      = false;
    
    mpu_armv72.$name             = "CONFIG_MPU_REGION1";
    mpu_armv72.size              = 15;
    mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv73.$name             = "CONFIG_MPU_REGION2";
    mpu_armv73.baseAddr          = 0x41010000;
    mpu_armv73.size              = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    
    mpu_armv74.$name             = "CONFIG_MPU_REGION3";
    mpu_armv74.baseAddr          = 0x70000000;
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.size              = 23;
    
    mpu_armv75.$name             = "CONFIG_MPU_REGION5";
    mpu_armv75.baseAddr          = 0xA5000000;
    mpu_armv75.size              = 23;
    mpu_armv75.attributes        = "NonCached";
    mpu_armv75.accessPermissions = "Supervisor RD+WR, User RD";
    
    enet_cpsw1.$name                           = "CONFIG_ENET_CPSW0";
    enet_cpsw1.customBoardEnable               = true;
    enet_cpsw1.mdioBusFreqHz                   = 200000;
    enet_cpsw1.ExternalPhyMgmtEnable           = true;
    enet_cpsw1.mdioMode                        = "MDIO_MODE_MANUAL";
    enet_cpsw1.txDmaChannel[0].$name           = "ENET_DMA_TX_CH0";
    enet_cpsw1.rxDmaChannel[0].$name           = "ENET_DMA_RX_CH0";
    enet_cpsw1.pinmux[0].$name                 = "ENET_CPSW_PINMUX0";
    enet_cpsw1.pinmux[0].MDIO.$assign          = "MDIO0";
    enet_cpsw1.pinmux[0].MDIO.MDC.$assign      = "PRG1_MDIO0_MDC";
    enet_cpsw1.pinmux[0].MDIO.MDIO.$assign     = "PRG1_MDIO0_MDIO";
    enet_cpsw1.pinmux[0].RGMII1.$assign        = "RGMII1";
    enet_cpsw1.pinmux[0].RGMII1.RD0.$assign    = "PRG1_PRU1_GPO5";
    enet_cpsw1.pinmux[0].RGMII1.RD1.$assign    = "PRG1_PRU1_GPO8";
    enet_cpsw1.pinmux[0].RGMII1.RD2.$assign    = "PRG1_PRU1_GPO18";
    enet_cpsw1.pinmux[0].RGMII1.RD3.$assign    = "PRG1_PRU1_GPO19";
    enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$assign = "PRG1_PRU0_GPO5";
    enet_cpsw1.pinmux[0].RGMII1.RXC.$assign    = "PRG1_PRU0_GPO8";
    enet_cpsw1.pinmux[0].RGMII1.TD0.$assign    = "PRG1_PRU1_GPO7";
    enet_cpsw1.pinmux[0].RGMII1.TD1.$assign    = "PRG1_PRU1_GPO9";
    enet_cpsw1.pinmux[0].RGMII1.TD2.$assign    = "PRG1_PRU1_GPO10";
    enet_cpsw1.pinmux[0].RGMII1.TD3.$assign    = "PRG1_PRU1_GPO17";
    enet_cpsw1.pinmux[0].RGMII1.TX_CTL.$assign = "PRG1_PRU0_GPO9";
    enet_cpsw1.pinmux[0].RGMII1.TXC.$assign    = "PRG1_PRU0_GPO10";
    enet_cpsw1.pinmux[0].RGMII2.RD0.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.RD1.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.RD2.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.RD3.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.RX_CTL.$used   = false;
    enet_cpsw1.pinmux[0].RGMII2.RXC.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.TD0.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.TD1.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.TD2.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.TD3.$used      = false;
    enet_cpsw1.pinmux[0].RGMII2.TX_CTL.$used   = false;
    enet_cpsw1.pinmux[0].RGMII2.TXC.$used      = false;
    
    udma1.$name        = "CONFIG_UDMA_PKTDMA_0";
    udma1.instance     = "PKTDMA_0";
    enet_cpsw1.udmaDrv = udma1;
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    flash1.peripheralDriver.OSPI.$suggestSolution      = "OSPI0";
    flash1.peripheralDriver.OSPI.CLK.$suggestSolution  = "OSPI0_CLK";
    flash1.peripheralDriver.OSPI.CSn0.$suggestSolution = "OSPI0_CSn0";
    flash1.peripheralDriver.OSPI.D3.$suggestSolution   = "OSPI0_D3";
    flash1.peripheralDriver.OSPI.D2.$suggestSolution   = "OSPI0_D2";
    flash1.peripheralDriver.OSPI.D1.$suggestSolution   = "OSPI0_D1";
    flash1.peripheralDriver.OSPI.D0.$suggestSolution   = "OSPI0_D0";
    gpio1.GPIO.$suggestSolution                        = "GPIO1";
    gpio2.GPIO.$suggestSolution                        = "GPIO1";
    gpio3.GPIO.$suggestSolution                        = "GPIO1";
    gpio4.GPIO.$suggestSolution                        = "GPIO1";
    gpio5.GPIO.$suggestSolution                        = "GPIO1";
    gpio6.GPIO.$suggestSolution                        = "GPIO1";
    gpio7.GPIO.$suggestSolution                        = "GPIO1";
    gpio8.GPIO.$suggestSolution                        = "GPIO1";
    gpio9.GPIO.$suggestSolution                        = "GPIO1";
    gpio10.GPIO.$suggestSolution                       = "GPIO1";
    gpio11.GPIO.$suggestSolution                       = "GPIO1";
    gpio12.GPIO.$suggestSolution                       = "GPIO1";
    gpio13.GPIO.$suggestSolution                       = "GPIO0";
    gpio14.GPIO.$suggestSolution                       = "GPIO1";
    gpio15.GPIO.$suggestSolution                       = "GPIO1";
    gpio16.GPIO.$suggestSolution                       = "GPIO1";
    gpio17.GPIO.$suggestSolution                       = "GPIO0";
    gpio18.GPIO.$suggestSolution                       = "GPIO0";
    gpio19.GPIO.$suggestSolution                       = "GPIO0";
    gpio20.GPIO.$suggestSolution                       = "GPIO0";
    gpio21.GPIO.$suggestSolution                       = "GPIO0";
    gpio22.GPIO.$suggestSolution                       = "GPIO0";
    gpio23.GPIO.$suggestSolution                       = "GPIO0";
    gpio24.GPIO.$suggestSolution                       = "GPIO0";
    gpio25.GPIO.$suggestSolution                       = "GPIO0";
    gpio26.GPIO.$suggestSolution                       = "GPIO0";
    gpio27.GPIO.$suggestSolution                       = "GPIO0";
    gpio28.GPIO.$suggestSolution                       = "GPIO0";
    gpio29.GPIO.$suggestSolution                       = "GPIO1";
    i2c1.I2C.SCL.$suggestSolution                      = "I2C0_SCL";
    i2c1.I2C.SDA.$suggestSolution                      = "I2C0_SDA";
    enet_cpsw1.pinmux[0].RGMII2.$suggestSolution       = "RGMII2";
    

    Best,

    Larry

  • Larry, 

    Thanks. I can update you status in next week

    Regards, 

    S. Anil

  • Hello Larry,

    I have looked at your SBL and Application configurations and all are OK except with OSPI peripheral.

    Can you please confirm the OSPI module is used in Application with our DMA ?

    Since you are not enabled DMA mode in system configuration.

    You do one test. We have initialized an OSPI module in SBL and removed OSPI peripheral in the system configuration and tried to use the API 's to write data on external memory. And see still you have the issues.

    I suspect that this issue will come during the OSPI initializations in Application.

    Regards,

    S.Anil.

  • Hi Swargam,

    Regarding the first question:
    Can you please confirm the OSPI module is used in Application with our DMA?
    No, I did not configure DMA for OSPI in the application. Today, I attempted to enable DMA for OSPI within the application and then test again, but it still did not restart.

    Additionally, I'm a bit unclear on your point. Are you suggesting that since I've already initialized OSPI in the SBL, I shouldn't initialize it again in the application? Do I need to remove OSPI from the syscfg in the application and directly call OSPI's handle as usual to perform reading and deletion of the external flash?

    Best,

    Larry

  • Additionally, I'm a bit unclear on your point. Are you suggesting that since I've already initialized OSPI in the SBL, I shouldn't initialize it again in the application? Do I need to remove OSPI from the syscfg in the application and directly call OSPI's handle as usual to perform reading and deletion of the external flash?

    Hello Larry,

    Yes, I assume that your application got stuck during the initializations of OSPI.

    You can try to remove your OSPI in system cfg and use direct OSPI calls to write and read operations.

    Else, you need to de -init the OSPI peripheral in the SBL exactly before jumping to Application and re init the OSPI in Application. In that case you don't, not see any issues.

    I hope it is possible for you and share your results.

    Regards,

    S.Anil.

  • Hi Swargam,

    My application does not get stuck during initialization.

    After the SBL has initialized OSPI and checks are complete, it jumps to the application, and initializing OSPI there does not cause any issues either. Following this, I successfully receive and write the firmware update to my external flash without any problems, until I execute Sciclient_pmDeviceReset(SystemP_WAIT_FOREVER); then, I find my address jumps to 0x418019F0.

    I can try modifying it in the way you suggested, but the timing of the process getting stuck does not seem to be during the initialization of OSPI, since both the SBL and application have already initialized OSPI by the time I finish receiving the firmware update.

    Best,

    Larry

  • Hi Swargam,

    Unfortunately, removing OSPI from the syscfg will directly cause compilation issues because the OSPI and FLASH components are linked. Removing OSPI necessitates the removal of FLASH as well, which leads to compilation errors due to missing corresponding functions.

    Moreover, during debugging, I first flash sbl_null before testing via the debug probe. Sbl_null does not include OSPI and FLASH, so there isn't an issue of repeated initialization. However, even in debug mode, after executing Sciclient_pmDeviceReset, the process still jumps to 0x418019F0. Therefore, I believe this might not be directly related to OSPI.

    Best,

    Larry

  • Hello Larry,

    Actually, we have seen that the that the same peripheralization is creating issues in customer applications.

    So, I have suggested applying the same procedure here.

    Anyway, you are using sbl_null, which does not use ospi and initializes all periperhals, and then after making the device reset,. Again, SOC is going to

    0x418019F0 address. I can try with your application at my side and will share my test results as well.

    Regards,

    S.Anil.

  • Hi Swargam,

    I apologize for the delayed response due to an extended holiday. I would like to ask, assuming we are unable to reboot through software, is it possible to reboot through hardware means? Theoretically, it should have the same effect, right? Our main goal is to get the AM2431 into SBL (Secondary Bootloader) mode so it can update the application. Is this theoretically feasible? If so, which pin should I trigger for this action?

    Best,

    Larry

  • I apologize for the delayed response due to an extended holiday. I would like to ask, assuming we are unable to reboot through software, is it possible to reboot through hardware means? Theoretically, it should have the same effect, right? Our main goal is to get the AM2431 into SBL (Secondary Bootloader) mode so it can update the application. Is this theoretically feasible? If so, which pin should I trigger for this action?

    Hello Larry,

    Yes your understanding is correct.

    Either you can do warm Reset through Switch or Software. The Boot sequence flow is same in both methods .

    So, you can try with the Warm Reset switches on your Hw.

    I don't think that problem is not with the Reset.

    Regards,

    S.Anil.

  • Hi Swargam,

    You're right; even with a hardware reset, I still end up at the 0x418019F0 address. Changing the reset method doesn't solve the problem. Additionally, I conducted an experiment using the SBL_NULL firmware for testing in debug mode.

    If I perform a hardware reset before executing Board_driversOpen();, the reset proceeds normally. However, performing a hardware reset after Board_driversOpen(); leads to jumping to the 0x418019F0 address. Even if I immediately follow Board_driversOpen(); with Board_driversClose(); and then perform a hardware reset, it still jumps to the 0x418019F0 address. As you mentioned, the problem likely relates to the flash because Board_driversOpen() essentially calls Board_flashOpen();, but the exact reason for this issue remains unknown.

    Best,

    Larry

  • Hi Swargam,

    I found the root cause, I attempted to change the flash protocol settings from 4s-4s-4s to 1s-1s-1s, and the issue was resolved. It was indeed caused by incorrect flash settings. Thank you for your tireless assistance!!

    Best,

    Larry

  • Hello Larry,

    Glad to hear that this issue is resolved.

    Oh, even I did not check the flash settings in your application and I mainly focused on duplicate peripheral configurations in both Application and SBL.

    I am closing this thread and open new threads for new queries .

    Regards,

    S.Anil.