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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
768 Views
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

 

 

Labels (1)
0 Kudos
Reply
1 Solution
751 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
760 Views
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 Kudos
Reply
756 Views
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 Kudos
Reply
752 Views
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 Kudos
Reply