Hi, I just recently got my hands on the demo kit and started reading through the example code. There are two questions for the following section of code.
// Switch on all FlexPWM channels
// Enable FlexPWMA/FlexPWMB fault protection
// Switch off all FlexPWM channels
First, is it required to switch on FlexPWM channels first before configuring DISMAP? It's not mentioned in the MPC5643L reference manual in nowhere. If so, why?
Second, the subfunction of FAULT_PROTECT_PWMA_ON actually clears DISA in DISMAP. However, if DISA is zero, the fault protection is disabled as seen in figure 25-27 and following quote.
The PWMA output will be turned off if there is a logic 1 on a FAULTx input and a 1 in the corresponding
bit of the DISA field.
But the comment of the code indicates it is for enabling fault protection?