Error when initialize I2C_3 on 5746C

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Error when initialize I2C_3 on 5746C

ソリューションへジャンプ
5,317件の閲覧回数
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,299件の閲覧回数
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,300件の閲覧回数
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,281件の閲覧回数
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,291件の閲覧回数
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 件の賞賛
返信