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.

CCS/RM48L952: rm48l952

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Dear Sir,

Can you please send any working code for UART Bootloader for RM48L952 evaluation board.

Best Regards,

Praveena M

  • Hello,

    http://www.ti.com/lit/an/spna190/spna190.pdf

    Please download the source code from the link in this document.

  • Hi Wang,

    I downloaded the code, and compiling the code in CCS v-8.0.

    Many errors are getting as shown below. So, please help me to solve this issue.

    Best Regards,

    Praveena M

  • Part Number: RM48L952

    Tool/software: Code Composer Studio

    Hi,

    when we compiled we are getting the following errors.

    Please help us to solve this issue.

    Best Regards,

    Praveena M

  • Hello,

    Please install F021 flash API and link the API library for your device:RM48:

  • Hi Wang,

    As, we followed your instruction. Still we are facing errors as shown below,

    Thanks and Regards,

    Praveena M

  • Hello,

    When you installed the bootloader, the library should be installed. When CCS open the project, the lash lib should be loaded to CCS too. I will find the latest bootloader for you.

  • Hi Wang,

    Here, flash lib files has installed. But, these are not loading into CCS v-8.0 in windows 10 pro (32-bit). So, please provide us the latest UART Boot-Loader code for RML952 HDK evaluation board as soon as possible.

    Thank you for your support.

    Best Regards,

    Praveena M

  • Hi Wang,

    Can you please reply us as soon as possible for the latest UART Bootloader code for RM48L952 (HDK) evaluation board for CCS V-8.0, Windows 10 Pro(32-Bit).

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    Try this one. I just updated to the latest HalCoGen:

    RM48HDK_UART_Bootloader.7z

  • Hello Wang,

    Thank you for your reply. 

    But, now I am not able to import this project in CCS v-8.0, windows 10-pro(32-bit). As, shown below is the issue I am getting.

    Please, help me to solve this issue.

    Thanks and Regards

    Praveena M

  • Hello Wang,

    Can you please support us for the above mentioned issue as soon as possible.

    Thanks ans Regards,

    Praveena M

  • Hi Praveena,

    I don't have CC8 on my machine. You can create a new CCS project, then copy all the folders to your new project.

  • Hello Wang,

    Thank you for your support.

    We are able to load and execute the code.

    But, whether we should flash the code in either Debug/Release mode.

    In hyper-terminal, we are getting the menu. And we followed (http://www.ti.com/lit/an/spna190/spna190.pdf) according to this link.

    But, we are not getting how to download and upload the code. Tell us how to generate the .bin file also

    Please, send me the procedure to do.

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    To download a binary file via HyperTerminal to the RM48x internal Flash, follow the procedure below:

    • Press “1” on the keyboard to choose the menu Download image to internal Flash.

      Then, in the Transfer menu, select Send file…

    • In the Filename field, type the name and the path of the binary file to be sent.

    • In the Protocol list, choose the Ymodem protocol

      Click the Send button.

    Following these steps, the bootloader loads the binary file into the RM48x internal Flash. The bootloader will display the file name, and file size in the Hyperterminal window.

  • You can use CCS to generate a bin file.

    In the project properties window, type the following command in “Post-Built Steps Command”:

    "${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/armofd" "${CG_TOOL_ROOT}/bin/armhex" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

     

  • Hello Wang,

    We generated .bin file.

    But, can you please tell the procedure how to download and upload the application code into board.

    As, we followed your steps, we got the following errors as shown below,

    Please, help us to solve this issue.

    Thanks and Regards

    Praveena M

       

  • Hi Wang,

    The above one for if we Press "1". 

    And if we Press "2" for upload. these are the issues.

    Please, help us.

    Thanks and Regards,

    Praveena M

  • Hi Wang,

    I tried with your .bin file. But, same issue is there as shown below,

    Thanks and Regards,

    Praveena M

  • Hello

    I don't have experience of using dsgdfb terminal. Can you please try the ymodem in TeraTerm Terminal? I just tried, it works well.

  • Hi Wang,

    Earlier we were using Hyper-Terminal. Now, we tried in TeraTerm Terminal and tried to send your .bin file. The issues are shown below,

    Please, help us to solve.

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    Please copy those two files to your folder. _copyAPI2RAM_ in sys_core.asm and _copyAPI2RAM_() in sys_startup.c are overwritten after I updated the HALCOGen drivers. Sorry for that.

    sys_startup.c
    /** @file sys_startup.c 
    *   @brief Startup Source File
    *   @date 11-Dec-2018
    *   @version 04.07.01
    *
    *   This file contains:
    *   - Include Files
    *   - Type Definitions
    *   - External Functions
    *   - VIM RAM Setup
    *   - Startup Routine
    *   .
    *   which are relevant for the Startup.
    */
    
    /* 
    * Copyright (C) 2009-2018 Texas Instruments Incorporated - www.ti.com 
    * 
    * 
    *  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.
    *
    */
    
    
    /* USER CODE BEGIN (0) */
    /* USER CODE END */
    
    
    /* Include Files */
    
    #include "sys_common.h"
    #include "system.h"
    #include "sys_vim.h"
    #include "sys_core.h"
    #include "sys_selftest.h"
    #include "esm.h"
    #include "mibspi.h"
    
    #include "errata_SSWF021_45.h"
    /* USER CODE BEGIN (1) */
    /* USER CODE END */
    
    
    /* USER CODE BEGIN (2) */
    /* USER CODE END */
    
    
    /* External Functions */
    /*SAFETYMCUSW 218 S MR:20.2 <APPROVED> "Functions from library" */
    extern void __TI_auto_init(void);
    /*SAFETYMCUSW 354 S MR:NA <APPROVED> " Startup code(main should be declared by the user)" */
    extern int main(void);
    /*SAFETYMCUSW 122 S MR:20.11 <APPROVED> "Startup code(exit and abort need to be present)" */
    /*SAFETYMCUSW 354 S MR:NA <APPROVED> " Startup code(Extern declaration present in the library)" */
    extern void exit(int _status);
    
    
    /* USER CODE BEGIN (3) */
    /* USER CODE END */
    void handlePLLLockFail(void);
    /* Startup Routine */
    void _c_int00(void);
    #define PLL_RETRIES 5U
    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    
    #pragma CODE_STATE(_c_int00, 32)
    #pragma INTERRUPT(_c_int00, RESET)
    #pragma WEAK(_c_int00)
    
    /* SourceId : STARTUP_SourceId_001 */
    /* DesignId : STARTUP_DesignId_001 */
    /* Requirements : HL_SR508 */
    void _c_int00(void)
    {    
    /* USER CODE BEGIN (5) */
    /* USER CODE END */
    
        /* Initialize Core Registers to avoid CCM Error */
        _coreInitRegisters_();
    
    /* USER CODE BEGIN (6) */
    /* USER CODE END */
    
        /* Initialize Stack Pointers */
        _coreInitStackPointer_();
    
    /* USER CODE BEGIN (7) */
    /* USER CODE END */
    
        /* Work Around for Errata DEVICE#140: ( Only on Rev A silicon) 
         *
         * Errata Description:
         *            The Core Compare Module(CCM-R4) may cause nERROR to be asserted after a cold power-on
         * Workaround:
         *            Clear ESM Group2 Channel 2 error in ESMSR2 and Compare error in CCMSR register */
        if (DEVICE_ID_REV == 0x802AAD05U)
        {
            _esmCcmErrorsClear_();
        }
        
    /* USER CODE BEGIN (8) */
    /* USER CODE END */
    
        /* Enable CPU Event Export */
        /* This allows the CPU to signal any single-bit or double-bit errors detected
         * by its ECC logic for accesses to program flash or data RAM.
         */
        _coreEnableEventBusExport_();
    
    /* USER CODE BEGIN (11) */
    /* USER CODE END */
    
            /* Workaround for Errata CORTEXR4 66 */
            _errata_CORTEXR4_66_();
        
            /* Workaround for Errata CORTEXR4 57 */ 
            _errata_CORTEXR4_57_();
    
        /* Reset handler: the following instructions read from the system exception status register
         * to identify the cause of the CPU reset.
         */
    
        /* check for power-on reset condition */
        /*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
        if ((SYS_EXCEPTION & POWERON_RESET) != 0U)
        {		
    /* USER CODE BEGIN (12) */
    /* USER CODE END */
            /* Add condition to check whether PLL can be started successfully */
            if (_errata_SSWF021_45_both_plls(PLL_RETRIES) != 0U)
            {
                /* Put system in a safe state */
    			handlePLLLockFail();
            }
            /* clear all reset status flags */
            SYS_EXCEPTION = 0xFFFFU;
    
    /* USER CODE BEGIN (13) */
    /* USER CODE END */
    /* USER CODE BEGIN (14) */
    /* USER CODE END */
    /* USER CODE BEGIN (15) */
    /* USER CODE END */
          /* continue with normal start-up sequence */
        }
        /*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
        else if ((SYS_EXCEPTION & OSC_FAILURE_RESET) != 0U)
        {
            /* Reset caused due to oscillator failure.
            Add user code here to handle oscillator failure */
    
    /* USER CODE BEGIN (16) */
    /* USER CODE END */
        }
        /*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
        else if ((SYS_EXCEPTION & WATCHDOG_RESET) !=0U)
        {
            /* Reset caused due 
             *  1) windowed watchdog violation - Add user code here to handle watchdog violation.
             *  2) ICEPICK Reset - After loading code via CCS / System Reset through CCS
             */
            /* Check the WatchDog Status register */
            if(WATCHDOG_STATUS != 0U)
            {
                /* Add user code here to handle watchdog violation. */ 
    /* USER CODE BEGIN (17) */
    /* USER CODE END */
    
                /* Clear the Watchdog reset flag in Exception Status register */ 
                SYS_EXCEPTION = WATCHDOG_RESET;
            
    /* USER CODE BEGIN (18) */
    /* USER CODE END */
            }
            else
            {
                /* Clear the ICEPICK reset flag in Exception Status register */ 
                SYS_EXCEPTION = ICEPICK_RESET;
    /* USER CODE BEGIN (19) */
    /* USER CODE END */
    		}
        }
        /*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
        else if ((SYS_EXCEPTION & CPU_RESET) !=0U)
        {
            /* Reset caused due to CPU reset.
            CPU reset can be caused by CPU self-test completion, or
            by toggling the "CPU RESET" bit of the CPU Reset Control Register. */
    
    /* USER CODE BEGIN (20) */
    /* USER CODE END */
    
            /* clear all reset status flags */
            SYS_EXCEPTION = CPU_RESET;
    
    /* USER CODE BEGIN (21) */
    /* USER CODE END */
    
        }
        /*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
        else if ((SYS_EXCEPTION & SW_RESET) != 0U)
        {
            /* Reset caused due to software reset.
            Add user code to handle software reset. */
    		
    /* USER CODE BEGIN (22) */
    /* USER CODE END */
    	}
        else
        {
            /* Reset caused by nRST being driven low externally.
            Add user code to handle external reset. */
    
    /* USER CODE BEGIN (23) */
    /* USER CODE END */
    	}
    
        /* Check if there were ESM group3 errors during power-up.
         * These could occur during eFuse auto-load or during reads from flash OTP
         * during power-up. Device operation is not reliable and not recommended
         * in this case.
         * An ESM group3 error only drives the nERROR pin low. An external circuit
         * that monitors the nERROR pin must take the appropriate action to ensure that
         * the system is placed in a safe state, as determined by the application.
         */
        if ((esmREG->SR1[2]) != 0U)
        {
    /* USER CODE BEGIN (24) */
    /* USER CODE END */
        /*SAFETYMCUSW 5 C MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
        /*SAFETYMCUSW 26 S MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
            for(;;)
            { 
            }/* Wait */                 
    /* USER CODE BEGIN (25) */
    /* USER CODE END */
        }
    
    /* USER CODE BEGIN (26) */
    /* USER CODE END */
    
        /* Initialize System - Clock, Flash settings with Efuse self check */
        systemInit();
        
        /* Workaround for Errata PBIST#4 */
        errata_PBIST_4();
    	
        /* Run a diagnostic check on the memory self-test controller.
         * This function chooses a RAM test algorithm and runs it on an on-chip ROM.
         * The memory self-test is expected to fail. The function ensures that the PBIST controller
         * is capable of detecting and indicating a memory self-test failure.
         */
        pbistSelfCheck();	
    	
    	/* Run PBIST on STC ROM */
        pbistRun((uint32)STC_ROM_PBIST_RAM_GROUP,
                 ((uint32)PBIST_TripleReadSlow | (uint32)PBIST_TripleReadFast));
        
        /* Wait for PBIST for STC ROM to be completed */
        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while(pbistIsTestCompleted() != TRUE)
        { 
        }/* Wait */ 
        
        /* Check if PBIST on STC ROM passed the self-test */
        if( pbistIsTestPassed() != TRUE)
        {
            /* PBIST and STC ROM failed the self-test.
             * Need custom handler to check the memory failure
             * and to take the appropriate next step.
             */
             
            pbistFail();
    
        }   
    	
        /* Disable PBIST clocks and disable memory self-test mode */
        pbistStop();
    
    	/* Run PBIST on PBIST ROM */
        pbistRun((uint32)PBIST_ROM_PBIST_RAM_GROUP,
                 ((uint32)PBIST_TripleReadSlow | (uint32)PBIST_TripleReadFast));
        
        /* Wait for PBIST for PBIST ROM to be completed */
        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while(pbistIsTestCompleted() != TRUE)
        { 
        }/* Wait */ 
        
        /* Check if PBIST ROM passed the self-test */
        if( pbistIsTestPassed() != TRUE)
        {
            /* PBIST and STC ROM failed the self-test.
             * Need custom handler to check the memory failure
             * and to take the appropriate next step.
             */
             
            pbistFail();
    
        } 
    	
        /* Disable PBIST clocks and disable memory self-test mode */
        pbistStop();	
    /* USER CODE BEGIN (29) */
    /* USER CODE END */
    
    /* USER CODE BEGIN (31) */
    /* USER CODE END */
    
        /* Disable RAM ECC before doing PBIST for Main RAM */
        _coreDisableRamEcc_();
        
        /* Run PBIST on CPU RAM.
         * The PBIST controller needs to be configured separately for single-port and dual-port SRAMs.
         * The CPU RAM is a single-port memory. The actual "RAM Group" for all on-chip SRAMs is defined in the
         * device datasheet.
         */
        pbistRun(0x08300020U, /* ESRAM Single Port PBIST */
                 (uint32)PBIST_March13N_SP);
    
    /* USER CODE BEGIN (32) */
    /* USER CODE END */
    
        /* Wait for PBIST for CPU RAM to be completed */
        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while(pbistIsTestCompleted() != TRUE)
        { 
        }/* Wait */                 
        
    
    /* USER CODE BEGIN (33) */
    /* USER CODE END */
        
        /* Check if CPU RAM passed the self-test */
        if( pbistIsTestPassed() != TRUE)
        {
            /* CPU RAM failed the self-test.
             * Need custom handler to check the memory failure
             * and to take the appropriate next step.
             */
    /* USER CODE BEGIN (34) */
    /* USER CODE END */
             
            pbistFail();
            
    /* USER CODE BEGIN (35) */
    /* USER CODE END */
        }
    
    /* USER CODE BEGIN (36) */
    /* USER CODE END */
    
        /* Disable PBIST clocks and disable memory self-test mode */
        pbistStop();
    
        
    /* USER CODE BEGIN (37) */
    /* USER CODE END */
    
    
        /* Initialize CPU RAM.
         * This function uses the system module's hardware for auto-initialization of memories and their
         * associated protection schemes. The CPU RAM is initialized by setting bit 0 of the MSIENA register.
         * Hence the value 0x1 passed to the function.
         * This function will initialize the entire CPU RAM and the corresponding ECC locations.
         */
        memoryInit(0x1U);
    
    /* USER CODE BEGIN (38) */
    /* USER CODE END */
        
        /* Enable ECC checking for TCRAM accesses.
         * This function enables the CPU's ECC logic for accesses to B0TCM and B1TCM.
         */
        _coreEnableRamEcc_();
    
    /* USER CODE BEGIN (39) */
    /* USER CODE END */
    
        /* Start PBIST on all dual-port memories */
        /* NOTE : Please Refer DEVICE DATASHEET for the list of Supported Dual port Memories.
           PBIST test performed only on the user selected memories in HALCoGen's GUI SAFETY INIT tab.
         */
        pbistRun(  (uint32)0x00000000U    /* EMAC RAM */
                 | (uint32)0x00000000U    /* USB RAM */  
                 | (uint32)0x00000800U    /* DMA RAM */
                 | (uint32)0x00000200U    /* VIM RAM */
                 | (uint32)0x00000040U    /* MIBSPI1 RAM */
                 | (uint32)0x00000080U    /* MIBSPI3 RAM */
                 | (uint32)0x00000100U    /* MIBSPI5 RAM */
                 | (uint32)0x00000004U    /* CAN1 RAM */
                 | (uint32)0x00000008U    /* CAN2 RAM */
                 | (uint32)0x00000010U    /* CAN3 RAM */
                 | (uint32)0x00000400U    /* ADC1 RAM */
                 | (uint32)0x00020000U    /* ADC2 RAM */
                 | (uint32)0x00001000U    /* HET1 RAM */
                 | (uint32)0x00040000U    /* HET2 RAM */
                 | (uint32)0x00002000U    /* HTU1 RAM */
                 | (uint32)0x00080000U    /* HTU2 RAM */
                 | (uint32)0x00004000U    /* RTP RAM */
                 | (uint32)0x00000000U    /* FRAY RAM */
                 ,(uint32) PBIST_March13N_DP);
    
    /* USER CODE BEGIN (40) */
    /* USER CODE END */
    
        /* Test the CPU ECC mechanism for RAM accesses.
         * The checkBxRAMECC functions cause deliberate single-bit and double-bit errors in TCRAM accesses
         * by corrupting 1 or 2 bits in the ECC. Reading from the TCRAM location with a 2-bit error
         * in the ECC causes a data abort exception. The data abort handler is written to look for
         * deliberately caused exception and to return the code execution to the instruction
         * following the one that caused the abort.
         */
        checkRAMECC();
    
    /* USER CODE BEGIN (41) */
    /* USER CODE END */
    /* USER CODE BEGIN (43) */
    /* USER CODE END */
    
        /* Wait for PBIST for CPU RAM to be completed */
        /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while(pbistIsTestCompleted() != TRUE)
        { 
        }/* Wait */                 
        
    
    /* USER CODE BEGIN (44) */
    /* USER CODE END */
    
        /* Check if CPU RAM passed the self-test */
        if( pbistIsTestPassed() != TRUE)
        {
    
    /* USER CODE BEGIN (45) */
    /* USER CODE END */
    
            /* CPU RAM failed the self-test.
             * Need custom handler to check the memory failure
             * and to take the appropriate next step.
             */
    /* USER CODE BEGIN (46) */
    /* USER CODE END */
             
            pbistFail();
            
    /* USER CODE BEGIN (47) */
    /* USER CODE END */
        }
    
    /* USER CODE BEGIN (48) */
    /* USER CODE END */
    
        /* Disable PBIST clocks and disable memory self-test mode */
        pbistStop();
        
    /* USER CODE BEGIN (55) */
    /* USER CODE END */
    
        /* Release the MibSPI1 modules from local reset.
         * This will cause the MibSPI1 RAMs to get initialized along with the parity memory.
         */
         mibspiREG1->GCR0 = 0x1U;
         
        /* Release the MibSPI3 modules from local reset.
         * This will cause the MibSPI3 RAMs to get initialized along with the parity memory.
         */
        mibspiREG3->GCR0 = 0x1U;
        
        /* Release the MibSPI5 modules from local reset.
         * This will cause the MibSPI5 RAMs to get initialized along with the parity memory.
         */
        mibspiREG5->GCR0 = 0x1U;
        
    /* USER CODE BEGIN (56) */
    /* USER CODE END */
    
        /* Enable parity on selected RAMs */
        enableParity();
        
        /* Initialize all on-chip SRAMs except for MibSPIx RAMs
         * The MibSPIx modules have their own auto-initialization mechanism which is triggered
         * as soon as the modules are brought out of local reset.
         */
        /* The system module auto-init will hang on the MibSPI RAM if the module is still in local reset.
         */
        /* NOTE : Please Refer DEVICE DATASHEET for the list of Supported Memories and their channel numbers.
                  Memory Initialization is perfomed only on the user selected memories in HALCoGen's GUI SAFETY INIT tab.
         */
        memoryInit( (uint32)((uint32)1U << 1U)    /* DMA RAM */
                  | (uint32)((uint32)1U << 2U)    /* VIM RAM */
                  | (uint32)((uint32)1U << 5U)    /* CAN1 RAM */
                  | (uint32)((uint32)1U << 6U)    /* CAN2 RAM */
                  | (uint32)((uint32)1U << 10U)   /* CAN3 RAM */
                  | (uint32)((uint32)1U << 8U)    /* ADC1 RAM */
                  | (uint32)((uint32)1U << 14U)   /* ADC2 RAM */
                  | (uint32)((uint32)1U << 3U)    /* HET1 RAM */
                  | (uint32)((uint32)1U << 4U)    /* HTU1 RAM */
                  | (uint32)((uint32)1U << 15U)   /* HET2 RAM */
                  | (uint32)((uint32)1U << 16U)   /* HTU2 RAM */
                  );
    
        /* Disable parity */
        disableParity();
        
        /* Test the parity protection mechanism for peripheral RAMs
           NOTE : Please Refer DEVICE DATASHEET for the list of Supported Memories with parity.
                     Parity Self check is perfomed only on the user selected memories in HALCoGen's GUI SAFETY INIT tab.
        */
    
    /* USER CODE BEGIN (57) */
    /* USER CODE END */
         
        het1ParityCheck();
        
    /* USER CODE BEGIN (58) */
    /* USER CODE END */
    
        htu1ParityCheck();
        
    /* USER CODE BEGIN (59) */
    /* USER CODE END */
    
        het2ParityCheck();
        
    /* USER CODE BEGIN (60) */
    /* USER CODE END */
    
        htu2ParityCheck();
        
    /* USER CODE BEGIN (61) */
    /* USER CODE END */
    
        adc1ParityCheck();
        
    /* USER CODE BEGIN (62) */
    /* USER CODE END */
    
        adc2ParityCheck();
        
    /* USER CODE BEGIN (63) */
    /* USER CODE END */
    
        can1ParityCheck();
        
    /* USER CODE BEGIN (64) */
    /* USER CODE END */
    
        can2ParityCheck();
        
    /* USER CODE BEGIN (65) */
    /* USER CODE END */
    
        can3ParityCheck();
        
    /* USER CODE BEGIN (66) */
    /* USER CODE END */
    
        vimParityCheck();
        
    /* USER CODE BEGIN (67) */
    /* USER CODE END */
    
        dmaParityCheck();
    
    
    /* USER CODE BEGIN (68) */
    /* USER CODE END */
    
    /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while ((mibspiREG1->FLG & 0x01000000U) == 0x01000000U)
        { 
        }/* Wait */                 
        /* wait for MibSPI1 RAM to complete initialization */
    /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while ((mibspiREG3->FLG & 0x01000000U) == 0x01000000U)
        { 
        }/* Wait */                 
        /* wait for MibSPI3 RAM to complete initialization */ 
    /*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
        while ((mibspiREG5->FLG & 0x01000000U) == 0x01000000U)
        { 
        }/* Wait */                 
        /* wait for MibSPI5 RAM to complete initialization */
    
    /* USER CODE BEGIN (69) */
    /* USER CODE END */
    
        mibspi1ParityCheck();
        
    /* USER CODE BEGIN (70) */
    /* USER CODE END */
    
        mibspi3ParityCheck();
        
    /* USER CODE BEGIN (71) */
    /* USER CODE END */
        
        mibspi5ParityCheck();
        
    
    /* USER CODE BEGIN (72) */
    /* USER CODE END */
        
        /* Enable IRQ offset via Vic controller */
        _coreEnableIrqVicOffset_();
        
    
    /* USER CODE BEGIN (73) */
    /* USER CODE END */
    
        /* Initialize VIM table */
        vimInit();    
    
    /* USER CODE BEGIN (74) */
    /* USER CODE END */
    
        /* Configure system response to error conditions signaled to the ESM group1 */
        /* This function can be configured from the ESM tab of HALCoGen */
        esmInit();
        /* initialize copy table */
        __TI_auto_init();
    /* USER CODE BEGIN (75) */
        _copyAPI2RAM_();
    /* USER CODE END */
        
        /* call the application */
    /*SAFETYMCUSW 296 S MR:8.6 <APPROVED> "Startup code(library functions at block scope)" */
    /*SAFETYMCUSW 326 S MR:8.2 <APPROVED> "Startup code(Declaration for main in library)" */
    /*SAFETYMCUSW 60 D MR:8.8 <APPROVED> "Startup code(Declaration for main in library;Only doing an extern for the same)" */
        main();
    
    /* USER CODE BEGIN (76) */
    /* USER CODE END */
    /*SAFETYMCUSW 122 S MR:20.11 <APPROVED> "Startup code(exit and abort need to be present)" */
        exit(0);
    
    /* USER CODE BEGIN (77) */
    /* USER CODE END */
    }
    
    /* USER CODE BEGIN (78) */
    /* USER CODE END */
    /** @fn void handlePLLLockFail(void)
    *   @brief This function handles PLL lock fail.
    */
    void handlePLLLockFail(void)
    {
    /* USER CODE BEGIN (79) */
    /* USER CODE END */
    	while(1)
    	{
    		
    	}
    /* USER CODE BEGIN (80) */
    /* USER CODE END */
    }
    /* USER CODE BEGIN (81) */
    /* USER CODE END */
    
    sys_core.asm

  • Hi Wang,

    Thank you for your reply.

    Here, we are not able to transfer the .bin file. It is showing as, "Failed to Receive the File". Please, support us to solve this issue.

    Thanks and Regards,

    Praveena M

  • There is no problem on my side.

    Ok, please add a breakpoint at:

      Size = Ymodem_Receive(UART, &tab_1024[0]);

    And run the code after you sending the file from the terminal. 

  • Hi Wang,

    We are able to download the .bin file in debug mode. It is loading the .bin file, but if we reset the board.

    Then, it is showing the message as, "TI Safety MCU Application Team, qjwang@ti.com". And, it is not executing our application code.

    Please, help us to solve this issue.

    Thanks & Regards,
    Praveena M

  • Hello,

    Please step through your code to check where the code is stuck in bootloader:

    fnRetValue = CheckForceUpdate();

    if ( !fnRetValue )
    {
    #ifdef DEBUG_MSG
           UART_putString(UART, "\r Jump to application... ");
    #endif
          g_ulTransferAddress = (uint32_t)APP_START_ADDRESS;
          ((void (*)(void))g_ulTransferAddress)();
    }

    The execution may be in your application, and abort (data or prefetch) may be happened after jumping to your application.

  • Hi Wang,

    Thank you for your reply.

    As, we Downloaded the .bin file in debugging mode and when we press '3'-->Execute Application, it is showing as,

    When we Restart in debugging mode and Press '3'--> Execute the Application, it is showing as,

    When we load the code again and in debugging mode, if we press '3'-->Execute the Application, it is showing as,

    Please, help us to solve this issues.

    Thanks and Regards,

    Praveena M

  • Hello,

    There is no problem on my side. I downloaded the application to flash starting 0x10000, and LED D5 blinks after pressing "3" .

    Please try my bin file:

    RM48HDK_bootloader_appTest.bin

  • Hi Wang,

    Once we load the boot loader code in debugging mode, blink LED application code is running. But, when we come out from the debugging mode and power-of and power-on, it is not blinking the LED and boot loader code menu also not displaying.

    So, we are still facing the problem. Kindly, help us to solve this issue.

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    Are there any ESM errors? If the program is aborted, please check the abort status and the address which causes the abort (CP15 DFSR, and data fault address register, etc).

  • Hello Wang,

    Here, as you suggested for transferring a file we should keep breakpoint at this place "Size = Ymodem_Receive(UART, &tab_1024[0])" in debugging mode.


    We are able to transfer files with that method.

    But, we need to transfer the files without keeping break point in debugging mode. Please, help us to solve the issue.

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    Please use a bigger value for WAIT_TIMEOUT which is defined in bl_ymodem.h

    #if defined (TMS570LS04) || defined (RM42) //LS04 and RM42 runs 80MHz
    #define WAIT_TIMEOUT 0x240000 //Timeout=1.003 seconds
    #elif defined (RM57) || defined (TMS570LC43)
    #define WAIT_TIMEOUT 0xB60000 //Timeout=1.003 seconds
    #else
    #define WAIT_TIMEOUT 0x480000 //Timeout=1.003 seconds
    #endif

  • Hi Wang,

    Thank you for your support, with the above information it is working fine.

    But, in our application code, if we initialise the SCI (UART), then it is not working(our application is not running).

    Please, help us to solve this issue.

    Thanks and Regards,

    Praveena M

  • Hi Wang,

    Here, we are able to load the application code(only for blink LED) through boot loader code.

    If we configure SCI or enabling any other interrupt, application code is not working.

    Here, we are attaching two codes. One for HET blink LED with SCI initialisation and the other is HET blink LED with GPIO Interrupt.

    Please, help us to solve this problem.

    Thanks and Regards,

    Praveena M

    SCI_HET.rar

    HET_GPIO_Interrupt.rar

  • You don't enable the GIO interrupt.

  • Hi Wang,

    As, you suggested not to enable interrupts.

    But, in our application we need both SCI initialisation and Interrupts. So, please give us a solution to solve this problem.

    Thanks and Regards,

    Praveena M.

  • Hello Praveena,

    Sorry for my confused word. 

    The GIO interrupt is not enabled in your configuration.

    You can enable it through the HALCOGen:

  • Hi Wang,

    What about SCI intialization in our application.

    If we enable SCIinit, our application is hanging.

    So, please help us to solve this issue.

    Thanks and Regards,

    Praveena M

  • Hello,

    Do you know where the code stuck? Don't you think this might be caused by the SCI RX waiting loop in your code? Do you use nested interrupt in your code? The nested interrupt is not recommended for Hercules MCU.

    I am sorry I can not debug your code.

  • Hi....

    We don't know where the code got strucked, because we are sending .bin file through UART bootloader.

    If we give SCIInit function, our application is not working.

    Is there any conflicts in SCI ports for application and boatloader code?

    Thanks and Regards,

    Praveena M

  • Hello Praveena,

    Please initialize MCU core registers and MCU memory in your application code:

    1. _coreInitRegisters_();

    2. memoryInit(...);

  • Hi Wang,

    We enabled GPIO interrupt in our application code. If we work normally without Boot loader code it is working fine.

    But, if we generate .bin file and transfer through Boot loader code, our application is not running.

    Please check in this attached code and help us to solve this issue.

    Thanks and Regards,

    Praveena M8664.HET_GPIO_Interrupt.rar

  • Hello Wang,

    If we initialize MCU core registers and MCU memory also, our application is not running.

    Please, check our application code attached here. with SCI initialization and HET blink LED(Application code).

    Thanks and Regards,

    Praveena M0383.SCI_HET.rar

  • Please modify the linker.cmd of your application project:

    Change:

       VECTORS (X) : origin=0x00000000 length=0x00000020
       FLASH0 (RX) : origin=0x00000020 length=0x0017FFE0

    to

       VECTORS (X) : origin=0x00010020 length=0x00000020

       FLASH0 (RX) : origin=0x00010040 length=0x0016FFB0

    Where 0x10020 is the start address of the application

  • Hi Wang,

    We followed as you suggested, but still if we do SCI initialization in our application.

     when we upload application code through boot loader, our application is not running.

    Please, check this code and help us to solve this issue.

    Thanks and Regards,

    Praveena M1351.SCI_HET.rar

  • Hi Wang,

    We did as you suggested by changing the address for VECTORS(X) and FLASH0(RX).

    Here, it is not executing the ISR function.

    Please, check the attached code and help us to solve the isssue.

    Thanks and Regards,

    Praveena M0363.HET_GPIO_Interrupt.rar

  • 1. Any interrupt is enabled in your bootloader? If yes, please disable them before jumping to application.

    2. Please make sure that the code has been jumped to application. What is value at 0x10000?

  • Hello Wang,

    We disabled RTI interrupt in our Boot Loader code.

    So, now also it is not executing GPIO_ISR function in our application code.

    And, if we initialize SCI in our application, our application is not running.

    Please, help us to solve the issues.

    Thanks and Regards,

    Praveena M

  • This is nothing to do with your bootloader. The SCI is used in my application, and I didn't see any kind of problem. I am sorry I am not able to debug this SW issue.