i Team,
We are using S32k312 MCU and we tried to configure Emios PWM using S32 Design Studio 3.5. We were not able to generate PWM signals. Please find the configuration in the below attachment and kindly correct if necessary. We are working on Non-Autosar Mode and we are using 6 PWM channels and the channels are given below.




Emios_Mcl_Ip_Init (EMIOS_1,&Emios_Mcl_Ip_1_Config_BOARD_INITPERIPHERALS);
Emios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_I0_CH0_CFG,&Emios_Pwm_Ip_I0_Ch0);
Emios_Pwm_Ip_InitChannel(EMIOS_0,&Emios_Pwm_Ip_I0_Ch1);
Emios_Pwm_Ip_InitChannel(EMIOS_0,&Emios_Pwm_Ip_I0_Ch2);
Emios_Pwm_Ip_InitChannel(EMIOS_0,&Emios_Pwm_Ip_I0_Ch3);
Emios_Pwm_Ip_InitChannel(EMIOS_0,&Emios_Pwm_Ip_I0_Ch4);
// Emios_Pwm_Ip_InitChannel(EMIOS_1,&Emios_Pwm_Ip_I1_Ch0);
Note :- Emios_Pwm_Ip_I1_Ch0 channel can't be able to init successfully. In below function code is getting terminate due to Base->CH.UC[Channel].C value is zero but we have initalized
Emios_Mcl_Ip_Init() fn below and find the config attached image MCL_IP;
Emios_Pwm_Ip_MasterBusModeType Emios_Pwm_Ip_GetChannelPwmMode( const Emios_Pwm_Ip_HwAddrType *const Base,
uint8 Channel)
while(1)
{
//Emios_Mcl_Ip_SetCounterBusPeriod(0,23,32768);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_PWM_IP_I0_CH0_CFG,EMIOS_PWM_IP_I0_CH0_CFG,3268);
sprintf( (char*)message, "Status_0 = %d \n",Status);
Uart_logs_transmit(message);
TestDelay(DELAY_TIMER);
DutyCycle = Emios_Pwm_Ip_GetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I0_CH0_CFG);
sprintf( (char*)message, "DutyCycle = %d \n",DutyCycle);
Uart_logs_transmit(message);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I0_CH1_CFG,32768);
TestDelay(DELAY_TIMER);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I0_CH2_CFG,32768);
TestDelay(DELAY_TIMER);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I0_CH3_CFG,32768);
TestDelay(DELAY_TIMER);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I0_CH4_CFG,32768);
TestDelay(DELAY_TIMER);
Status = Emios_Pwm_Ip_SetDutyCycle(EMIOS_0,EMIOS_PWM_IP_I1_CH0_CFG,32768);
}
If we have missed anything, Let us know.