Error when initialize I2C_3 on 5746C

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when initialize I2C_3 on 5746C

Jump to solution
686 Views
shenminns
Contributor I

Hi,

When my program runs to the following code:

static inline void I2C_ResetModuleState(I2C_Type *baseAddr)
{
/* Reset the I2C Bus Control Register values */
baseAddr->IBCR = 0x80;

/* Reset the I2C Bus Interrupt Configuration Register */
baseAddr->IBIC = 0x00;
}

It goes to  IVOR1_Handler immediately.

The function I2C_ResetModuleState() was called by I2C_DRV_MasterInit() on the SDK.

The configuration and log of the registers are attached, hope it will be helpful.

Many thanks!

Labels (1)
0 Kudos
1 Solution
668 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

it looks like module is not clocked. Check in clock manager is the module is not gated off.

Also within a code, you can check actual peripheral status in ME_ME_PS1 register.

 

BR, Petr

View solution in original post

3 Replies
669 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

it looks like module is not clocked. Check in clock manager is the module is not gated off.

Also within a code, you can check actual peripheral status in ME_ME_PS1 register.

 

BR, Petr

650 Views
shenminns
Contributor I

Dear Petr,

Though the problem was solved, I still have some questions: why the clock error leads to the result of bits errors on MCSR-BUS_WRERR/G/ST/MAV? Or why did you think it was the clock problem that caused the error on  MCSR-BUS_WRERR/G/ST/MAV?

Thanks again!

0 Kudos
660 Views
shenminns
Contributor I

Dear Petr,

Thank you so much for your solution. It was exactly what you said, I missed the configuration in the clock manager. And now it's OK. Thanks again.

0 Kudos