infineon4engi@twitter infineon4engineers infineon@linkedin infineon@youtube
twitter Facebook Linkedin Youtube

Banner_Aurix_Competition Banner_AURIX_Security-Solution Banner_AURIX_Safety_Products ShieldBuddy TC275 Banner_AURIX_OnzerOS Banner_AURIX_DevelopmentStudio


+ Reply to Thread
Results 1 to 7 of 7

Thread: SMU software alarm trigger using SMU CMD (Commands)

  1. #1
    Intermediate Intermediate Fernandes is on a distinguished road
    Join Date
    Aug 2020
    Posts
    34
    Points
    415

    SMU software alarm trigger using SMU CMD (Commands)

    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
    Code:
    IfxSmu_cmd(&MODULE_SMU, IfxSmu_Cmd_triggerAlarm, x);

  2. #2
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    352
    Points
    7310
    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.

  3. #3
    Intermediate Intermediate Fernandes is on a distinguished road
    Join Date
    Aug 2020
    Posts
    34
    Points
    415
    Thanks. The Software alarms work.

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

    Here is my configuration:
    Code:
    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

  4. #4
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    352
    Points
    7310
    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.
    Last edited by UC_wrangler; Sep 15th, 2020 at 06:12 AM.

  5. #5
    Intermediate Intermediate Fernandes is on a distinguished road
    Join Date
    Aug 2020
    Posts
    34
    Points
    415
    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.

  6. #6
    Advanced Advanced UC_wrangler will become famous soon enough
    Join Date
    Jun 2019
    Posts
    352
    Points
    7310
    Thanks Fernandes - always good to hear a happy ending

  7. #7
    Intermediate Intermediate Fernandes is on a distinguished road
    Join Date
    Aug 2020
    Posts
    34
    Points
    415
    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/threa...-causes-errors
    Last edited by Fernandes; Sep 18th, 2020 at 02:33 AM.

+ Reply to Thread

Tags for this Thread

Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.