I am having difficulties attaching eMIOS signals to LCU with TRGMUX. Therefore, I have three questions:
Lastly, the initialization code:
/* Initialize clock () */
Clock_Ip_Init(&Mcu_aClockConfigPB[0]);
/* Initialize all pins using the Port driver */
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
/* Initialize LCU for complementary signal */
Lcu_Ip_ReturnType ret_lcu = Lcu_Ip_Init(&Lcu_Ip_xLcuInitPB);
if (ret_lcu != LCU_IP_STATUS_SUCCESS)
{
exit_code = 1u;
}
/* TRGMUX: connect eMIOS to LCU */
Trgmux_Ip_StatusType ret_trgmux = Trgmux_Ip_Init(&Trgmux_Ip_xTrgmuxInitPB);
if (ret_trgmux != TRGMUX_IP_STATUS_SUCCESS)
{
exit_code = 1u;
}
/* OPWMB */
/* - Initialize Emios_Mcl driver */
/* WATCH OUT: AbeMat: Instance hard coded*/
Emios_Mcl_Ip_Init(1U, &Emios_Mcl_Ip_1_Config_BOARD_INITPERIPHERALS);
/* - Initialize Chargepump: Emios_Pwm_Ip driver */
Emios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_BOARD_InitPeripherals_I1_CH12_CFG, &Emios_Pwm_Ip_BOARD_InitPeripherals_I1_Ch12);
Solved! Go to Solution.
Turned out there was a problem when declaring the Motor_OutputList: The LogicOutputId should be the logical value (0 and 1), which is the ID of the LC output instance, instead of the physical value (channel 8 and 9) (screenshot attached).
After modified as above capture, I could be able to see the generated pulse in PTC12 (LCU_1 ch9) and PTC13 (LCU_1 ch8).
Hello @abemat . I'm sorry for the late response.
I've succeeded into replicating the block diagram above. I'm attaching a file that I've received from NXP techs. I think that this will help you to create complimentary signals with rise/fall filter.
Kind regards,
kyf
Hello abemat,
Did the example "LcuControlMotor" help you with complementary signals ?
I'm trying to figure out how to setup the LCU driver in order to create complimentary PWM signals fed from 1 eMIOS channel. Did you find any other documentation regarding LCU configuration except S32K3xx ref manual ?
I'm trying to create the set-up from S32K3xx RM :
I have not implemented it yet, but this was the idea I originally wanted to pursue. Did you succesfully make complementary PWM yet?
Turned out there was a problem when declaring the Motor_OutputList: The LogicOutputId should be the logical value (0 and 1), which is the ID of the LC output instance, instead of the physical value (channel 8 and 9) (screenshot attached).
After modified as above capture, I could be able to see the generated pulse in PTC12 (LCU_1 ch9) and PTC13 (LCU_1 ch8).
Can you share a copy of your project? I would like to try to reproduce it as a learning, thank you very much