MC33772C writing 1 to w0C register bits

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

MC33772C writing 1 to w0C register bits

1,079件の閲覧回数
sahyaclarios
Contributor I

Hello,

 

There are many register bits in the MC33772C device which can be cleared by writing 0 to them.

My question is what happens if we write 1 to these bits?

Is the write ignored? Or will it have the same effect as the device setting the bit to 1.

Example: ADC2_OFFSET_COMP register has bits CC_P_OVF, CC_N_OVF, SAMP_OVF, CC_OVT which are marked as w0c.

ラベル(1)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

1,033件の閲覧回数
sahyaclarios
Contributor I

Hello David,

Thanks for the reply.

I understand your recommendation about not writing to such bits.

But I am in a dilemma about what to do in cases where I want to clear only one of the multiple such bits in a register.

Example: suppose both CC_N_OVF and CC_P_OVF bits are set (in a hypothetical scenario), and I want to acknowledge CC_P_OVF only and clear it in one SPI message. But I still want to keep CC_N_OVF flag set, because I intend to clear it at a later point in time.
So, in this scenario, how would I recommend I only clear CC_P_OVF without clearing the other indication bits in that register? 

0 件の賞賛
返信

1,010件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello Sahyadri,

Please accept my apologies for the delayed response.

Have you tried to write 0 only to the interested bit (from the w0c bits)?

For example, if you pretend to clear the CC_N_OVF bit, you may write 0x5C00.

diazmarin09_0-1672083328826.png

 

Could you please share your results?

0 件の賞賛
返信

1,065件の閲覧回数
diazmarin09
NXP TechSupport
NXP TechSupport

Hello Sahyadri,

I hope all is great with you.

Please note that these register bits are “flags” and they are related to the device status.

Writing 1 to them will have no effect, but I personally recommended not to write to such bits, unless you intend to clear them.

diazmarin09_0-1670974691522.png

 

I hope this information helps.

Regards,

David

0 件の賞賛
返信