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

跳至解决方案
703 次查看
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 解答
686 次查看
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 回复数
695 次查看
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 项奖励
回复
691 次查看
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 项奖励
回复
687 次查看
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 项奖励
回复