Error when initialize I2C_3 on 5746C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Error when initialize I2C_3 on 5746C

跳至解决方案
5,284 次查看
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!

标签 (1)
0 项奖励
回复
1 解答
5,266 次查看
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

在原帖中查看解决方案

3 回复数
5,267 次查看
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

5,248 次查看
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 项奖励
回复
5,258 次查看
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 项奖励
回复