Hi,
I was having the same problem, however, I still am a bit confused and my code does not work at all too.
Based on the discussion above, I have a few questions and I hope this will make this forum more clearer.
1. The above example only set the XBARA1 for pwm2, what about pwm4. Do we need to have both of them in there?
XBARA_Init(XBARA1);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm2Fault0);
Ques_1) What about kXBARA1_OutputFlexpwm4Fault0??
Ques_2) In the SDK examples, I also noticed that they are setting the following Faults too. I seriously don't know what are those and should we set them or not? If we need, do we need to set them for pwm4 as well?
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm2Fault1);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1234Fault2);
XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm1234Fault3);
2. Let's say that I have done the 'XBARA1_Init(XBARA1) routine' for pwm2Fault0 in an instance, later in another instance, I did another 'XBARA1_Init(XBARA1) routine' for pwm4 by changing the parameters of kXBARA1_OutputFlexpwm2Fault0 to kXBARA1_OutputFlexpwm4Fault0. Will this cause the system to hang?
Ques_1) Do they need to do in one go or use another XBAR or stop the current running one and start again or anything? Sorry, I cannot find any information on this and I just need your adviser to get my understanding straight for this XBAR thingy. Also please guide me to the right documentations for my understanding.
3. I noticed that your advise is to do the XBAR_Init before setting up the PWM configuration (I also experienced this is true for my case too.) My question would be is this the hardcore rules that this XBAR thingy needs to be done before all the peripheral setup and not after or else it will not work? What is exactly this thing anyway since it is so **bleep** important?
4. Actually, the PWMs I am using is PWM1 (Module 2, Signal A) and PWM3 (Module 1, Signal A & B). Yes 3 PWM signals. I have set up for PWM3 and both A and B signal can output successfully. But, when I add in PWM1 (with separate PWM configuration and XBAR1_Init, all 3 signals got jammed. I am totally bombed, puzzled and frustrated by that. Then came across this forum and try to do a comparison and notice the explanation not complete. Hence, this lengthy letter. Hopefully, you can help me and maybe save someone some troubles reading multiple forum for the sake of using the IC.
Thanks.