Problem in producing Complimentary PWM using RTDs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem in producing Complimentary PWM using RTDs

ソリューションへジャンプ
2,557件の閲覧回数
abdul_rahman
Contributor IV

Hi NXP team,

I'm trying to prepare a project to make S32K344 controller to produce complimentary PWM outputs with a single eMIOS instance. I've tried using the presentation example, which was attached in one of the questions in the forum, which I've attached it for your reference. I've also gone through the application notes of the 3-phase sensorless PMSM controller from NXP. The main.c file of my code is,

 

int main(void)
{
/* Initialize clock () */
Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);
 
/* Initialize all pins using the Port driver */
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
 
/* Initialize Emios_Mcl driver */
Emios_Mcl_Ip_Init(INSTANCE_0, &Emios_Mcl_Ip_0_Config_BOARD_INITPERIPHERALS);
 
/* Initialize Emios_Pwm_Ip driver */
Emios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_I0_CH1_CFG, &Emios_Pwm_Ip_I0_Ch1);
 
/* Set new period for the channels that used external counter bus */
Emios_Mcl_Ip_SetCounterBusPeriod(INSTANCE_0, CHANNEL_0, 0x8000);
 
/* Duty cycle = 50% */
    Emios_Pwm_Ip_SetDutyCycle(INSTANCE_0, CHANNEL_0, 0x4000);
 
    /* De-Initialize Emios_Pwm_Ip driver */
    //Emios_Pwm_Ip_DeInitChannel(INSTANCE_0, CHANNEL_0);
 
    Trgmux_Ip_Init(&Trgmux_Ip_xTrgmuxInitPB);
 
    //Lcu_Ip_SetSyncInputMuxSelect (LCU_IP_SYNC_SEL_INPUT0, 1U);
    Lcu_Ip_Init(&Lcu_Ip_xLcuInitPB);
    Comp_PWMList[0U].Value = LCU_IP_OUTPUT_ENABLE;
    Comp_PWMList[1U].Value = LCU_IP_OUTPUT_ENABLE;
    Lcu_Ip_SetSyncOutputEnable (&Comp_PWMList[0U], 2);
 
    return 0U;
}
 
I have attached the entire project file for your reference. I've been on this code for over a week and I'm able to find out the bugs in my program. Please look into the errors I've made in preparing the code and also suggest me the solution to it. It would be really helpful.
 
#S32K344 #emios #LCU #TRGMUX #PWM
タグ(4)
0 件の賞賛
返信
1 解決策
2,520件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@abdul_rahman

please refer to the link below 

https://community.nxp.com/t5/S32K/LCU-out-PWM/td-p/1759686

there is a demo project in the link and you can refer to it.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,521件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@abdul_rahman

please refer to the link below 

https://community.nxp.com/t5/S32K/LCU-out-PWM/td-p/1759686

there is a demo project in the link and you can refer to it.

0 件の賞賛
返信
2,514件の閲覧回数
abdul_rahman
Contributor IV

Hi @Senlent 

Thanks for the help. The code works fine.

 

 

0 件の賞賛
返信