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.

RM42L432: Fapi_initializeFlashBanks ESM GROUP3 CHANNEL 7

Part Number: RM42L432
Other Parts Discussed in Thread: HALCOGEN

I use the F021 Flash API V.2.01.01 to flash the FEE of the RM42L432at 100MHz.

I call the Fapi_initializeFlashBanks() function with HCLK_FREQ=100 I get the return code success. RWAIT and EWAIT are initialized to 4.

But after execute this function, i find the esm ESM GROUP3 CHANNEL 7 is wrong,  then i find the the FEDACSTATUS register bit 8 B1_UNC_ERR and bit 17 B2_UNC_ERR is set. 

i want to know why the esm group3 channel 7 is wrong?

  • The error is caused by an uncorrectable ECC error. If ECC is enabled, please make sure you are also initializing the ECC for Bank7 correctly as well.
  • hi, Chuck

    First, thank you for quickly reply.
    Below is my initializing code for fee, but it does not work well, please help me point at what i missed in the code.

    void setupFlash(void)
    {

    /* USER CODE BEGIN (6) */
    /* USER CODE END */

    /** - Setup flash read mode, address wait states and data wait states */
    flashWREG->FRDCNTL = 0x00000000U
    | (uint32)((uint32)1U << 8U)
    | (uint32)((uint32)0U << 4U)
    | (uint32)1U;

    /** - Setup flash access wait states for bank 7 */
    FSM_WR_ENA_HL = 0x5U;
    EEPROM_CONFIG_HL = 0x00000002U
    | (uint32)((uint32)4U << 16U) ;

    /* USER CODE BEGIN (7) */
    /* USER CODE END */

    /** - Disable write access to flash state machine registers */
    FSM_WR_ENA_HL = 0xAU;

    /** - Setup flash bank power modes */
    flashWREG->FBFALLBACK = 0x00000000U
    | (uint32)((uint32)SYS_ACTIVE << 14U) /* BANK 7 */
    | (uint32)((uint32)SYS_ACTIVE << 0U); /* BANK 0 */


    /* USER CODE BEGIN (8) */
    /* Enable Error Detection and Correction is enabled*/
    flashWREG->EECTRL1 = flashWREG->EECTRL1 & 0xfffffff0;
    flashWREG->EECTRL1 = flashWREG->EECTRL1 | 0x0A;
    /* USER CODE END */

    }
  • Hello User,

    It seems you are trying to use the F021 Flash API and not the FEE library. For the Fee Library, please refer to the example provided within Halcogen for the RM42x_RM41x device family. The source for it is located at this path C:\ti\Hercules\HALCoGen\v04.06.01\examples\RM42x_41x\example_TI_Fee_Write_Read.c (provded you installed Halcogen to the default location).
  • i have used FEE library, but when i call TI_FEE_Init();
    I have set the fee halcogen, the generate code is (TI_FEE_GENERATE_DEVICEANDVIRTUALSECTORSTRUC == STD_OFF),
    how can i set TI_FEE_GENERATE_DEVICEANDVIRTUALSECTORSTRUC == STD_ON?

    Error[Li005]: no definition for "Device_FlashDevice" [referenced from C:\work\template\HIO_HWA_IAR7405_sysdiagnostic_fee\IdePrjIarIAR7405\Debug\Obj\ti_fee_ini.o]
  • Hello User,

    I will forward your question to one of our FEE experts. They should get back with you shortly.
  • "Device_FlashDevice" constant structure is defined in Device_RM42.c file. Hope this file is included in the Project.
    TI_FEE_GENERATE_DEVICEANDVIRTUALSECTORSTRUC must be STD_OFF if Device_RM42.c is included. This should be your usecase.

    There are some legacy customer use case where Device specific parameters are provided during Runtime by customers, to support them TI_FEE_GENERATE_DEVICEANDVIRTUALSECTORSTRUC must be STD_ON.