Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
oneday
Level 2
Level 2
First comment on blog 10 replies posted 10 questions asked

Dear experts:

        I have a question about When does an Alarm status need to be cleared? For example,If the software alarm1 is configured as IRQ0, I would like to know whether the alarm status (AG10[1]) corresponding to the software alarm1 needs to be cleared in the interrupt service function in a practical application scenario. Can I clear the alarm status (AG10[1]) after executing the interrupt service function? If the software alarm1 is not cleared, is there any problem or impact during the use?

oneday_0-1678239728600.png

Looking forward to your reply.

0 Likes
1 Solution
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored
    MODULE_SMU.AG[alarmGroup].U =
        (uint32)((uint32)0x1U << alarmPos);


    MODULE_SMU.AEXCLR.U = (uint32)((uint32)0x1U << alarmEx);

As I known, SMU needs to clear above 2 bit in the ISR routine, it's hard to say there is any unexpected issue if you don't clear or clear the regs later. I suggest to follow the example code at least there is no harm and that could make sure to enable the interrupt again if any new SMU event happens.

View solution in original post

1 Reply
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored
    MODULE_SMU.AG[alarmGroup].U =
        (uint32)((uint32)0x1U << alarmPos);


    MODULE_SMU.AEXCLR.U = (uint32)((uint32)0x1U << alarmEx);

As I known, SMU needs to clear above 2 bit in the ISR routine, it's hard to say there is any unexpected issue if you don't clear or clear the regs later. I suggest to follow the example code at least there is no harm and that could make sure to enable the interrupt again if any new SMU event happens.