FSTAT deposit writes 1 to clear FPVIOL and ACCERR,but the value is still 0

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

FSTAT deposit writes 1 to clear FPVIOL and ACCERR,but the value is still 0

ソリューションへジャンプ
564件の閲覧回数
ZEROOO
Contributor IV

When debugging Csec module with S32K118, example 1_Configure_part_and_Load_keys is used. FSTAT deposit writes 1 to clear FPVIOL and ACCERR. Why is it still 0 detected by debugger after writing.Did the register automatically clear to 0 after writing 1 in the initialization phase?

ZEROooo_0-1679563536803.png

ZEROooo_1-1679563725640.png

 

 

ラベル(1)
0 件の賞賛
1 解決策
547件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

If the two flags were set, the W1C would clear the flags.

But since the flags are not set, the code does nothing.

The code does not suppose to set the flags.

 

BR, Daniel

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
556件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ZEROOO,

I'm not sure if I understand the question.

But this is expected, the bits are W1C (Write 1 to clear), refers to a register bitfield that must be written as 1 to be "cleared."

danielmartynek_1-1679582746552.png

 

danielmartynek_0-1679582697573.png

 

Regards,

Daniel

0 件の賞賛
552件の閲覧回数
ZEROOO
Contributor IV

Hi

    This code is to write 1 to the FSTAT register ACCERR and FPVIOL fields, but the actual ic5000 debugging found that it did not write in, as shown below.

ZEROooo_0-1679619671839.png

 

0 件の賞賛
548件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

If the two flags were set, the W1C would clear the flags.

But since the flags are not set, the code does nothing.

The code does not suppose to set the flags.

 

BR, Daniel

0 件の賞賛