XMC_SCU_CLRSTSTAT There may be a problem with this function

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Jun_ZW
Level 1
Level 1
First reply posted First question asked First like given

The XMC_SCU_CLRSTSTAT function in the xmc4_scu.c file in XMCLib.

  • void XMC_SCU_CLRSTSTAT(void){
    uint32_t u32clregtemp=SCU_RESET->RSTCLR;
    SCU_RESET->RSTCLR=u32clregtemp&0xfffffffe;
    }

Why is the last bit not cleared?

I think it should be like this:

  • void XMC_SCU_CLRSTSTAT(void){
    uint32_t u32clregtemp=SCU_RESET->RSTCLR;
    SCU_RESET->RSTCLR=u32clregtemp&0xfffffffe;
    SCU_RESET->RSTCLR=SCU_RESET->RSTCLR|0x01;
    }
0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

No Problem Jun. Thanks for confirming that the issue is not with XMCLib.  Following are the status register bits and status information. You can modify the custom API according to your requirement.

Vasanth_0-1644832934095.png

Best Regards,
Vasanth

View solution in original post

3 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi,

Can you confirm the XMClib version you are using at your end ? Is it  XMClib v2.1.24 ?

Best Regards,
Vasanth

0 Likes
Jun_ZW
Level 1
Level 1
First reply posted First question asked First like given

I got it wrong. This function is provided by FAE.😅

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

No Problem Jun. Thanks for confirming that the issue is not with XMCLib.  Following are the status register bits and status information. You can modify the custom API according to your requirement.

Vasanth_0-1644832934095.png

Best Regards,
Vasanth