START PWM Fault management for SAM E70 ?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it implemented in ASF4 ?

START / ASF4 wizard for PWM driver has optional fields to configure Faults. Skipping all the "exotic" features available in SAM (such as "recoverable" faults etc...) I only need the basic fault management which sets the PWM output pads to a pre-programmed state.  Wizard shows all the needed configurable options for that but the generated output does not show anything of that to be implemented.

HALL_SIM_PWM0_PORT_init() only configures PWM output pins ,

pwm_init(&HALL_SIM_PWM0, PWM0, _pwm_get_pwm()) does not do anything to configure faults

Are those wizards options only a nice screen without implementation ?

Did anybody make a fully functional PWM with basic external break in ASF4?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A closely related question should be added to the previous: START wizard allows to choose a glitch filtering to the fault input through external GPIO pin. So if I activate this option, is it implemented ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fault external inputs miraculously worked as configured.

PWM outputs dropped to '0' when fault/break button pressed and restored when button released.

Screenshots of configuration attached. Fault 0 input used which is hooked internally to PA9 (called PWMC0_PWMFI0 in the datasheet).

Still, I have no idea where it is implemented in code as nothing found in all usual user-updatable files neither in hal_ library files.

Too bad because I don't know  how to use option " Fault stays active until the fault is removed at the pin and it is cleared at the PWM Fault Clear Register".

There is no API for PWM Fault Clear Register available in HAL APIs and no PWM descriptor has any related field. Is this Fault management implemented at the HRI  level ?

I guess this is left to be implemented by the user at the register level.

 

Anti-glitch filter setup is hard to check with oscilloscope as the period of dampened noise is too short to notice and I cannot find functions which implement this functionality (assuming it is implemented).

Anyways, Fault is working at it's basic level as long as fault/break input stays active at the input pin.

Attachment(s):