Skip to main content
Explorer II
October 22, 2024
Solved

HRTIM software FAULT configuration

  • October 22, 2024
  • 1 reply
  • 1020 views

Hi all!

I have NUCLEO stm32G474RE board, and I am playing with HRTIM.

I am trying to take advantage of fault logic, found in HRTIM module.

HRTIM can have GPIO hardware input, which can shut down all HRTIM outputs, without any software overhead.

Now, I would like to trigger this fault logic, but from software. I can shut down HRTIM from software the „usual“ way, but that is multistage process, first one needs to disable counters, then disable outputs, then force all outputs to zero, shut down all interrupts, and so on...

I want to read the value of an adc, and if this value is above some threshold, active the fault. 

Is it possible to do that, and if so, anyone know how to do it?

    This topic has been closed for replies.
    Best answer by Francois VILMAIN

    Hello,

    you could use the HRTIM fault input interconnect capabilities. For example, on G4 you can select COMP2 output as HRTIM_FLT1 source. Then, when you need to trigger the 'fault' by software, you just have to set an active level on the COMP2 output.

    1 reply

    ST Employee
    January 3, 2025

    Hello,

    you could use the HRTIM fault input interconnect capabilities. For example, on G4 you can select COMP2 output as HRTIM_FLT1 source. Then, when you need to trigger the 'fault' by software, you just have to set an active level on the COMP2 output.