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.

AM5716: Use I2C5 from A15 Initialisation/Exception

Part Number: AM5716
Other Parts Discussed in Thread: TEST

Dear TI-Support 

In our product we are using an AM571x Sitara processor. We are trying to use the I2C5 Interface from the A15 processor. To initalize the interface I use the method I2C_open(4, NULL) from the TI-RTOS. It will return without an error. Except for I2C_init() no other I2C5 method is called. The A15 crashes than with an exception. I2C1 - 4 are working fine. I can see that the clock is running for I2C5 in the  CM_IPU_I2C5_CLKCTRL register. All I2C5 Interrupts are turned off. We are not using the IPUs. If I try to write to the I2C5 register for example SYSTEST than an exception is thrown as well. 

Is it still possible to use I2C5 from the A15 instead of the IPU?

Are there any additional initialisation steps needed? 

Some additional Informations: 

We use the TI-RTOS with pdk 1.0.17

 

Here is the exception: 

Exception occurred in ThreadType_Task.

Task handle: 0xa4030cb0.

Task stack base: 0xa4206d28.

Task stack size: 0x2000.

R0 = 0x4807c000  R8  = 0xa4208a0c

R1 = 0xa4208950  R9  = 0xa4216f00

R2 = 0x801618d8  R10 = 0x00000009

R3 = 0x00000000  R11 = 0xa4208a54

R4 = 0xa42579bc  R12 = 0x00000000

R5 = 0xa403231c  SP(R13) = 0xa4208a08

R6 = 0xa4032204  LR(R14) = 0x801617dc

R7 = 0x00000000  PC(R15) = 0x801617dc

PSR = 0x600001df

DFSR = 0x00001211  IFSR = 0x00000000

DFAR = 0x00000000  IFAR = 0x00000000

Exception call stack,

0 I2C_open_v1(struct I2C_Config_s *, struct I2C_Params_s *) at I2C_v1.c:807,PC = 0x801617DC FP = 0xA4208A58

 

When I try to write to the I2C5 register directly the exception happens in the ti_rtos_idle_task. 

Thanks for your help. 

 

Kind regards 

Marco

  • Hi,

    Can you please share which example from PDK are you referring to test this?

    Regards,
    Parth

  • Dear Parth

    I tried to use the I2C example from the pdk_am57xx_1_0_17 on a idkAM571x. Unfortunatly i can't reproduce the error with this setup. Can you give me any hints how to debug this issue? It looks like the exception happens when I2CAutoIdleDisable is called. Is it possible that the IPU is messing things up without us using it?

    Kind regards

    Marco

  • To resolve the issue I added the following lines of code: 

    CSL_ipu_cm_core_aonRegs *SYS_CoreIPUCmRegs = (CSL_ipu_cm_core_aonRegs *) CSL_MPU_IPU_CM_CORE_AON_REGS;
    
    SYS_CoreIPUCmRegs->CM_IPU1_CLKSTCTRL_REG = CSL_IPU_CM_CORE_AON_CM_IPU1_CLKSTCTRL_REG_CLKTRCTRL_SW_WKUP;
    SYS_CoreIPUCmRegs->CM_IPU_CLKSTCTRL_REG = CSL_IPU_CM_CORE_AON_CM_IPU_CLKSTCTRL_REG_CLKTRCTRL_SW_WKUP;
    SYS_CoreIPUCmRegs->CM_IPU_I2C5_CLKCTRL_REG = CSL_IPU_CM_CORE_AON_CM_IPU_I2C5_CLKCTRL_REG_MODULEMODE_ENABLE;

    When I check the register written, they already contain the value 0x2 but without the write the A15 crashes when I2C_open is called. Any idea why this is the case? 

    Regards 

    Marco