The code generated by PSIM, configure CPU1 as the ownership of the peripherals, however, If I want to change the ownership of the peripherals to CPU2, is there any changes required for PWM initialization?
In actual case, the CPUSEL0 register should be 1 by the "DevCfgRegs.CPUSEL0.bit.EPWM1 = 1".
Where, I can make changes inside the following PWM initialization generated by PSIM?
// --- PWM Initialization for Inverter (PWM1, PWM2 @ 60kHz ) ---
PS_PwmInit(
1, 0, 1, 1.0e6 / (PWM_FREQUENCY_HZ * 1.0), ePwmUseAB, ePwmStartLow1, ePwmComplement,
HRPWM_DISABLE); // pwmNo, pinSel, waveType, period, outtype, PwmA, PWMB, UseHRPwm, Period calculation based on PWM_FREQUENCY_HZ
PS_PwmSetDeadBand(1, 0, 2, 3, 0, 0.3, 0.3); // Deadband settings - review values '0.3', '0.3'
PS_PwmSetIntrType(1, ePwmIntrAdc, 1, 0); // PWM1 interrupt triggers ADC, interrupt after 1st event
PS_AdcSetIntr(1, 1, 2, Task); // ADC1 interrupt 1, SOC2 triggers Task() ISR
PS_PwmSetTripAction(1, eTzHiZ, eTzHiZ); // Trip zone action - HiZ output
PWM_CMPA(1) = (2 + (-1) - 0) / (1.0f * 2.0f) * PWM_TBPRD(1); // Initial duty cycle for PWM1 (0%?)
PSM_PwmStart(1);
kindly suggest.