AM263P4-Q1: Compilation issue with CDD_I2C module in AM26xx MCAL 11.00.00 version in Interrupt mode

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

Tool/software:

Hello Team,

we have configured CDD_I2C module interrupt mode.

While compilation we are getting an issue with I2C interrupts.

During preprocess stage ISR names are replaced with index numbers, generated by OS

There is no issue with AM26xx MCAL 10.02.01, with same configuration.

*I2C module is compiled and working, when it is using in polling method.

Could you please provide any workaround to fix the issue with interrupt configuration.

Kind regards,

Hari  

  • Hi Hari,

    Let me check this internally and get back to you end of this week.

    Thanks and Regards,

    Nikhil Dasan

  • Hi Hari,

    Are you using CDD_I2C_ISR_CAT2 here?

    Thanks and Regards,

    Nikhil Dasan

  • Hi Nikhil,

    Yes, we are using CAT2 and the interrupts will be handled by OS.

    Kind regards,

    Hari

  • Understood, then it makes sense. 

    The declaration was not present earlier and for CAT2, ISR() expands to something like ISR_Cdd_I2c_HwUnit0_ISR.

    But now since the declaration was added, it is calling void 1 (void) __attribute_xxxx, void 2 (void) __attribute_xxxx etc

    I believe, removing the declaration (i.e. change similar to SDK 10.2) should fix this issue. Have you tried this?

    I've raised this bug internally, and will share the official fix as a patch. 

    Meanwhile, this change should unblock you right?

    Thanks and Regards,

    Nikhil Dasan

  • It is working, when i takeover the changes from MCAL version 10.02.

    Actual: 11.0

    #if defined(CDD_I2C_HW_UNIT_2_ACTIVE)

    void Cdd_I2c_HwUnit2_ISR(void) __attribute__((target("arm")));

    Modified & working: from 10.02

    #if defined(CDD_I2C_HW_UNIT_2_ACTIVE)

    __attribute__((target("arm")))

    *Is there any changes regarding MCU reset?

    • Reset is working and RBL is loading my SBL with MCAL 10.02. no issues
    • With latest MCAL 11.0 same SBL is not working and RBL is not loading SBL from flash.

    *Is there an changes regarding NOR flash memory alignment for SBL and Application?

  • Hi,

    I believe you are using the SIP device right?

    In the API, Fls_Ospi_ProgramInstance(), the reset of the flash should be taken care as shown below.

    Can you check if the below MACRO is executing at your end?

    Thanks and Regards,

    Nikhil Dasan

  • Hi Nikhil,

    Yes, we are using SIP device and considered the macros, called before Mcu_PerformReset as shown below.

    board_flash_reset(); is from ioexp_tca6416_6424.c/h file from MCAL.

    RBL -> BM(SBL) ->BL -> APP/BLU

    Memory Map

    • BM at 0x60000000
    • BL at 0x60030000
    • APP/BLU at 0x60100000
  • Hi Hari,

    Were you using the same API before to perform Mcu_performReset() ?

    Would you like to understand what has changed at your end from SDK 10.2 to SDK 11.0 migration.

    Thanks and Regards,

    Nikhil Dasan

  • Hi Nikhil,

    Were you using the same API before to perform Mcu_performReset() ?

    Yes, same api used with Mcal 10.x.x.

    I have not observed major differences in Mcu module specific.

    What could be possible reasons to not to copy SBL by RBL?

    Still i'm debugging the issue.

  • As aligned in the call, please check if the content of the SBL is erased before performing the reset.

  • Hi Nikhil,

    Content of SBL is not erased and if it erases, it will not work on power cycle.

    SBL is loading on Power cycle, but not loading on Mcu reset.

  • Hi Hari, 

    On my side I tested this feature using FLS App. I kep flash reseta and MCU reset APIs at the end of FLS App. The test was done on an AM263P Control Card with SIP Package MCU. 

    Then I flashed both the SDK SBL and this application. On POR,  I could the Application executing repetedly becuase of MCU reset. 

    Could you please try to run this on your side ?The result of this experiment will help us in analyzing the issue

    To summarise,

    1. Took SDK SBL.

    2. In FLS APP added flash reset and mcu reset at the end. Flash reset API is available in FLS App itself.

    3.  Flashed both SBL and Application

    Regards,

    Aswin

  • Hi Aswin,

    Due to other priority task, i was not able to test and reply the issue.

    After checking/understanding the SBL from SDK, observed a function to fix OSPI issue.

    Same function is used in old SDK also.

    As in our application, we use MCAL only, no SDK, so i have not gone through the TI SBL line to line code. 

    Could you please explain below & why it is working on Power on reset?

    In the last working application we used OSPI mode as 118.

    • With latest Mcal we started again using TI recommended Fls configuration, where OSPI mode 888.
    • This mode is causing the issue.

    Now i reverted OSPI mode to 118, and the RESET is working.

    Kind regards,

    Hari

  • Hi Hari,

    The above mentioned function does a flash reset and sets ospi to 1s-1s-1s mode. This is done to put flash in a known state. The ROM will configure the flash in a mode depending on the boot mode. So before reconfiguring ospi and flash, this is done. Flash reset will put it in 1s-1s-1s mode. Along with reset ospi interface is configured in 1s-1s-1s mode.

    Regards,

    Aswin

  • Hi Hari,

    In the MCAL SBL, is there flashFixUpOspiBoot() ?

    I performed the SW reset procedure using FlsApp example and MCU PLUS SDK SBL and it was working as I have mentioned above. So this must be a flash/ospi configuration in the SBL.

    Regards,

    Aswin