SMU software alarm trigger using SMU CMD (Commands)

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

cross mob
User20083
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
Hi,

SMU_Alarm(ARG)
Triggers a software based alarm. ARG specifies
the alarm index according to the mapping defined
in “Alarm Mapping” on Page 10-14. A software
alarm has the same properties as an hardware
alarm.

This doesn't help me. what should ARG(x) be (for example the DTS alarm : ALM3[25] SCU/DTS Design Measure: Die Temperature Sensor Alarm: Temperature underflow)
when i use it in
IfxSmu_cmd(&MODULE_SMU, IfxSmu_Cmd_triggerAlarm, x);
0 Likes
6 Replies
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
SMU_Alarm(ARG) can only be used to set software alarms: see ALM10[0..15] in the variant specific appendix (e.g., TC33xTC32x_appx_um_v1.5.pdf). ARG is the number of the alarm (0..15).

If you want to induce a different alarm, the SMU needs to be in START state, and then you can set bits in SMU_AGx: see Table 532 Handling of Alarm Status in the User Manual SMU chapter.

It's not possible to set alarms in RUN state, as specified in the last row of the table.
0 Likes
User20083
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
Thanks. The Software alarms work.

But I cannot get the hardware DTS SMU alarm to trigger a reset.

Here is my configuration:
volatile uint8_t test;
IfxDts_Dts_Config DTS_configuration;
IfxDts_Dts_initModuleConfig(&DTS_configuration);

DTS_configuration.lowerTemperatureLimit = 35.0;
DTS_configuration.upperTemperatureLimit = 40.0;

DTS_configuration.isrPriority = 0;

IfxDts_Dts_initModule(&DTS_configuration);

IfxDts_Dts_startSensor();

// Configure SMU to cause SCU reset on temperature faults

// Unlock SMU registers (temporary)
(void) IfxSmu_unlock(&MODULE_SMU);

// Configure the alarm for temperature overflow
IfxSmu_setAlarmConfig(&MODULE_SMU, IfxSmu_Alarm_ScuDtsTemperatureOverflow, IfxSmu_AlarmConfig_scuReset);

// Configure the alarm for temperature underflow
IfxSmu_setAlarmConfig(&MODULE_SMU, IfxSmu_Alarm_ScuDtsTemperatureUnderflow, IfxSmu_AlarmConfig_scuReset);

// Lock SMU registers (temporary)
IfxSmu_lock(&MODULE_SMU);

test = IfxSmu_isAlarmSet(&MODULE_SMU, IfxSmu_Alarm_ScuDtsTemperatureUnderflow);

(void) test;


The objective is to cause a reset if temperatures exceed limits. When I run it, the DTS registers shows an over/underflow as expected but the SMU status (in my case DTS alarms are AG3[25] and AG3[26]) do not get set and no reset occurs.

I'm on a TC234 triboard
Please advise
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Can you set a breakpoint at IfxSmu_unlock and see if the DTS alarm is already set? The logic will already be latched if DTSLIM.UOF=1 or DTSLIM.LLU=1, so enabling the SMU later would mean the alarm is lost.

As a quick test, you might try initializing the DTS *after* the SMU.
0 Likes
User20083
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
As a quick test, you might try initializing the DTS *after* the SMU.


This worked. Thanks. Also, I realized I was reading AG states which do not retain status after resets. I am now reading AD registers and it works.
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Thanks Fernandes - always good to hear a happy ending 🙂
0 Likes
User20083
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted
The SCU resets when I try to use Unlock/lock features on the SMU

Here is the issue I have created https://www.infineonforums.com/threads/11783-Using-SMU-Lock-Unlock-functions-causes-errors
0 Likes