Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

AURIX™ Forum Discussions

oneday
Level 2
Level 2
5 likes given First like received 10 sign-ins

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
dw
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received
    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
dw
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 100 likes received
    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.

This widget could not be displayed.