eMIOS module of NXP s32k311 mcu

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

eMIOS module of NXP s32k311 mcu

2,649 Views
piyush1
Contributor III

piyush1_0-1752901706529.png

hello nxp team....

i am working on s32k311 mcu and not able to understand this emios module and how to configure it and its registers and buses and channels and alll.....please help me out in detailes so that i can configure it by myself

0 Kudos
Reply
7 Replies

2,611 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

I recommend you to read S32K3_RTD_Training_eMIOS_public.pdf attached in S32K311 EMIOS GPT


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

2,594 Views
piyush1
Contributor III

/* Including necessary configuration files. */

#include "Mcal.h"

 

#include"s32k311.h"

 

#include "Clock_Ip.h"

#include "Emios_Pwm_Ip.h"

#include "Emios_Mcl_Ip.h"

#include "Siul2_Port_Ip.h"

 

//#define NUM_BLINK_LED (uint32)10U

//#define DELAY_TIMER (uint32)5000000U

 

#define INSTANCE_0 (uint8)0U

#define INSTANCE_1 (uint8)1U

#define CHANNEL_12 (uint8)12U

#define CHANNEL_23 (uint8)23U

 

 

volatile int exit_code = 0;

 

 

/* User includes */

 

/*!

\brief The main function for the project.

\details The startup initialization sequence is the following:

* - startup asm routine

* - main()

*/

int main(void)

{

/* Write your code here */

 

 

/* Initialize clock */

Clock_Ip_Init(&Clock_Ip_aClockConfig[0U]);

 

/* Initialize all pins using the Port driver */

Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals);

 

/* Initialize EMIOS MCL driver */

Emios_Mcl_Ip_Init(INSTANCE_1, &Emios_Mcl_Ip_Sa_1_Config);

//Emios_Mcl_Ip_Init(INSTANCE_0, &Emios_Mcl_Ip_Sa_0_Config);

/* Initialize EMIOS PWM driver */

//Emios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_VS_0_I1_CH12_CFG, &Emios_Pwm_Ip_VS_0_I1_Ch12);

Emios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_SA_I1_CH12_CFG, &Emios_Pwm_Ip_Sa_I1_Ch12);

 

/* Set new period for the channels that used external counter bus */

Emios_Mcl_Ip_SetCounterBusPeriod(INSTANCE_1, CHANNEL_23, 15000);

 

 

Emios_Pwm_Ip_SetDutyCycle(INSTANCE_1, CHANNEL_12, 7500);

/* Using duty 0% and 100% to blink LED */

while(1)

{

 

}

 

return exit_code;

}

 

/** @} */



I HAVE WRITTEN THIS CODE TO GENERATE SIMPLE PWM SIGNAL WITH EMIOS1 CH12 ON
PTD6 PIN OF S32K31XEVB-Q100 FOR S32K311,
BUT I AM NOT GETTING ANY SIGNAL..PLEASE RESOLE AND HELP.

0 Kudos
Reply

2,579 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please send me the test project to check. It is difficult for me to find the root cause by only looking at the code without looking at the peripheral configuration in the S32 Configuration Tool.

0 Kudos
Reply

2,573 Views
piyush1
Contributor III
i solved the issue but now i have few questions like
1.for OPWMB mode prescaler is fixed??
2.is the global counter bus configurations are in emios_mcl_ip driver?
3. there are 24 channels ..so for every channel is it necessary to configure global bus counter?

like i need to generate normal pwm signals, complementary pwm signals.....so what things i need to configure and take care ?
0 Kudos
Reply

2,523 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

A1. Note Clock prescaler(Internal Prescaler) Will only have an effect in OPWFMB and OPMCB modes.(Shown in S32 Configuration Tool). If OPWMB mode is selected, only global prescaler(Master Bus Prescaler) is active by using S32CT.

Clock prescaler Will only have an effect in OPWFMB and OPMCB modes.png

A2. The global counter bus configurations are in emios_mcl_ip driver.

A3. Depending on the emios mode you choose, there is no need to add the global counter bus repeatedly.

About PWM complementary I suggest you refer to AN14429: Dual 3-phase 48V PMSM Motor Control Kit with S32K344 using RTD low-level API

C:\NXP\MC_DevKits\MCSPTE1AK344\doc\ApplicationNotes\AN13767 3-phase Sensorless PMSM Motor Control Kit with S32K344 using RTD Low Level API.pdf

0 Kudos
Reply

2,520 Views
piyush1
Contributor III

piyush1_0-1753264074373.png

can you explain me what is this default period and offset at start??? i didn't get where it relates... 

0 Kudos
Reply

2,491 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Please read the section 63.5.3.18 Output PWM Buffered (OPWMB) mode of S32K3XXRM and section 3. EmiosMclEnableGlobalTimeBase: Enable global timebase or disable on EMIOS IP. of RTD_MCL_UM.pdf.

63.5.3.18 Output PWM Buffered (OPWMB) mode  Offset at start.png

Since the master bus of the OPWMB you selected is in MCB mode, I think Offset at start will not have any effect.

As per Default period, shown the Selected counter bus in 63.5.3.18.5 Timing example: matches and flags of S32K3XXRM.

Figure 358. Timing example matches and flags.png

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2136828%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EeMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136828%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22piyush1_0-1752901706529.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22piyush1_0-1752901706529.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348337i38AB70BD6C6842AE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22piyush1_0-1752901706529.png%22%20alt%3D%22piyush1_0-1752901706529.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ehello%20nxp%20team....%3CBR%20%2F%3E%3CBR%20%2F%3Ei%20am%20working%20on%20s32k311%20mcu%20and%20not%20able%20to%20understand%20this%20emios%20module%20and%20how%20to%20configure%20it%20and%20its%20registers%20and%20buses%20and%20channels%20and%20alll.....please%20help%20me%20out%20in%20detailes%20so%20that%20i%20can%20configure%20it%20by%20myself%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139937%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139937%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20read%20the%20section%20%3CEM%3E%3CSTRONG%3E63.5.3.18%3C%2FSTRONG%3E%20%3CSTRONG%3EOutput%20PWM%20Buffered%20(OPWMB)%20mode%3C%2FSTRONG%3E%3C%2FEM%3E%20of%20%3CSTRONG%3ES32K3XXRM%3C%2FSTRONG%3E%20and%20section%26nbsp%3B%3CSTRONG%3E%3CEM%3E3.%20EmiosMclEnableGlobalTimeBase%3A%20Enable%20global%20timebase%20or%20disable%20on%20EMIOS%20IP.%3C%2FEM%3E%3C%2FSTRONG%3E%20of%26nbsp%3B%3CSTRONG%3ERTD_MCL_UM.pdf%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%2263.5.3.18%20Output%20PWM%20Buffered%20(OPWMB)%20mode%20%20Offset%20at%20start.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2263.5.3.18%20Output%20PWM%20Buffered%20(OPWMB)%20mode%20%20Offset%20at%20start.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349274i698F45DF30D5D825%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2263.5.3.18%20Output%20PWM%20Buffered%20(OPWMB)%20mode%20%20Offset%20at%20start.png%22%20alt%3D%2263.5.3.18%20Output%20PWM%20Buffered%20(OPWMB)%20mode%20%20Offset%20at%20start.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESince%20the%20master%20bus%20of%20the%20OPWMB%20you%20selected%20is%20in%20MCB%20mode%2C%20I%20think%20%3CSTRONG%3EOffset%20at%20start%3C%2FSTRONG%3E%20will%20not%20have%20any%20effect.%3C%2FP%3E%0A%3CP%3EAs%20per%20%3CSTRONG%3EDefault%20period%3C%2FSTRONG%3E%2C%20shown%20the%20%3CSTRONG%3ESelected%20counter%20bus%3C%2FSTRONG%3E%26nbsp%3Bin%2063.5.3.18.5%20Timing%20example%3A%20matches%20and%20flags%20of%26nbsp%3B%3CSTRONG%3ES32K3XXRM%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Figure%20358.%20Timing%20example%20matches%20and%20flags.png%22%20style%3D%22width%3A%20861px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Figure%20358.%20Timing%20example%20matches%20and%20flags.png%22%20style%3D%22width%3A%20861px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349276i2AD1A3AABD81B31A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Figure%20358.%20Timing%20example%20matches%20and%20flags.png%22%20alt%3D%22Figure%20358.%20Timing%20example%20matches%20and%20flags.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139274%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139274%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22piyush1_0-1753264074373.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22piyush1_0-1753264074373.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349085iAFD8CB86A4E64198%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22piyush1_0-1753264074373.png%22%20alt%3D%22piyush1_0-1753264074373.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Ecan%20you%20explain%20me%20what%20is%20this%20default%20period%20and%20offset%20at%20start%3F%3F%3F%20i%20didn't%20get%20where%20it%20relates...%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2139241%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2139241%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EA1.%26nbsp%3B%3CSPAN%3ENote%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EClock%20prescaler(Internal%20P%3CSPAN%3Erescaler%3C%2FSPAN%3E)%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3EWill%20only%20have%20an%20effect%20in%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOPWFMB%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOPMCB%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Emodes%3C%2FEM%3E%3CSPAN%3E.(Shown%20in%20S32%20Configuration%20Tool).%20If%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EOPWMB%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bmode%20is%20selected%2C%20only%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eglobal%20prescaler(Master%20Bus%20Prescaler)%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bis%20active%20by%20using%20S32CT.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Clock%20prescaler%20Will%20only%20have%20an%20effect%20in%20OPWFMB%20and%20OPMCB%20modes.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Clock%20prescaler%20Will%20only%20have%20an%20effect%20in%20OPWFMB%20and%20OPMCB%20modes.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F349073iD3A0F33719567073%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Clock%20prescaler%20Will%20only%20have%20an%20effect%20in%20OPWFMB%20and%20OPMCB%20modes.png%22%20alt%3D%22Clock%20prescaler%20Will%20only%20have%20an%20effect%20in%20OPWFMB%20and%20OPMCB%20modes.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EA2.%20The%20global%20counter%20bus%20configurations%20are%20in%20emios_mcl_ip%20driver.%3C%2FP%3E%0A%3CP%3EA3.%20Depending%20on%20the%20emios%20mode%20you%20choose%2C%20there%20is%20no%20need%20to%20add%20the%20global%20counter%20bus%20repeatedly.%3C%2FP%3E%0A%3CP%3EAbout%20PWM%20complementary%20I%20suggest%20you%20refer%20to%26nbsp%3B%3CA%20id%3D%22relatedDocsClickPDF_1%22%20class%3D%22dtmcustomrulelink%22%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DAN14429%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%20data-dtmaction%3D%22Documentation%20Section%20-%20Results%20Link%20Click%22%20data-dtmsubaction%3D%22AN14429%3A%20Dual%203-phase%2048V%20PMSM%20Motor%20Control%20Kit%20with%20S32K344%20using%20RTD%20low-level%20API%20-%20NXP%20-%20Application%20Note%20-%20English%22%20data-cl-id%3D%22644907421%22%3E%3CSPAN%3EAN14429%3A%20Dual%203-phase%2048V%26nbsp%3B%3CSPAN%20class%3D%22highlight%22%3EPMSM%3C%2FSPAN%3E%26nbsp%3BMotor%20Control%20Kit%20with%20S32K344%20using%20RTD%20low-level%20API%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EC%3A%5CNXP%5CMC_DevKits%5CMCSPTE1AK344%5Cdoc%5CApplicationNotes%5CAN13767%203-phase%20Sensorless%20PMSM%20Motor%20Control%20Kit%20with%20S32K344%20using%20RTD%20Low%20Level%20API.pdf%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei%20solved%20the%20issue%20but%20now%20i%20have%20few%20questions%20like%3CBR%20%2F%3E1.for%20OPWMB%20mode%20prescaler%20is%20fixed%3F%3F%3CBR%20%2F%3E2.is%20the%20global%20counter%20bus%20configurations%20are%20in%20emios_mcl_ip%20driver%3F%3CBR%20%2F%3E3.%20there%20are%2024%20channels%20..so%20for%20every%20channel%20is%20it%20necessary%20to%20configure%20global%20bus%20counter%3F%3CBR%20%2F%3E%3CBR%20%2F%3Elike%20i%20need%20to%20generate%20normal%20pwm%20signals%2C%20complementary%20pwm%20signals.....so%20what%20things%20i%20need%20to%20configure%20and%20take%20care%20%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137943%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPlease%20send%20me%20the%20test%20project%20to%20check.%20It%20is%20difficult%20for%20me%20to%20find%20the%20root%20cause%20by%20only%20looking%20at%20the%20code%20without%20looking%20at%20the%20peripheral%20configuration%20in%20the%20%3CEM%3ES32%20Configuration%20Tool%3C%2FEM%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2137410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2137410%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3E%2F*%20Including%20necessary%20configuration%20files.%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%20%3CSPAN%3E%22Mcal.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%3CSPAN%3E%22s32k311.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%20%3CSPAN%3E%22Clock_Ip.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%20%3CSPAN%3E%22Emios_Pwm_Ip.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%20%3CSPAN%3E%22Emios_Mcl_Ip.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23include%3C%2FSPAN%3E%20%3CSPAN%3E%22Siul2_Port_Ip.h%22%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F%2F%23define%20NUM_BLINK_LED%20(uint32)10U%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F%2F%23define%20DELAY_TIMER%20(uint32)5000000U%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%23define%3C%2FSPAN%3E%20%3CSPAN%3EINSTANCE_0%3C%2FSPAN%3E%3CSPAN%3E%20(uint8)0U%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23define%3C%2FSPAN%3E%20%3CSPAN%3EINSTANCE_1%3C%2FSPAN%3E%3CSPAN%3E%20(uint8)1U%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23define%3C%2FSPAN%3E%20%3CSPAN%3ECHANNEL_12%3C%2FSPAN%3E%3CSPAN%3E%20(uint8)12U%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%23define%3C%2FSPAN%3E%20%3CSPAN%3ECHANNEL_23%3C%2FSPAN%3E%3CSPAN%3E%20(uint8)23U%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3Evolatile%3C%2FSPAN%3E%20%3CSPAN%3Eint%3C%2FSPAN%3E%3CSPAN%3E%20exit_code%20%3C%2FSPAN%3E%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E0%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20User%20includes%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5Cbrief%20The%20main%20function%20for%20the%20project.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5Cdetails%20The%20startup%20initialization%20sequence%20is%20the%20following%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20-%20startup%20%3C%2FSPAN%3E%3CSPAN%3Easm%3C%2FSPAN%3E%3CSPAN%3E%20routine%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%20-%20main()%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eint%3C%2FSPAN%3E%20%3CSPAN%3Emain%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Evoid%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F*%20Write%20your%20code%20here%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20Initialize%20clock%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EClock_Ip_Init%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%3EClock_Ip_aClockConfig%3C%2FSPAN%3E%3CSPAN%3E%5B%3C%2FSPAN%3E%3CSPAN%3E0%3C%2FSPAN%3E%3CSPAN%3EU%3C%2FSPAN%3E%3CSPAN%3E%5D)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20Initialize%20all%20pins%20using%20the%20Port%20driver%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESiul2_Port_Ip_Init%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ENUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20Initialize%20EMIOS%20MCL%20driver%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EEmios_Mcl_Ip_Init%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EINSTANCE_1%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%3EEmios_Mcl_Ip_Sa_1_Config%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F%2FEmios_Mcl_Ip_Init(INSTANCE_0%2C%20%26amp%3BEmios_Mcl_Ip_Sa_0_%3C%2FSPAN%3E%3CSPAN%3EConfig%3C%2FSPAN%3E%3CSPAN%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F*%20Initialize%20EMIOS%20PWM%20driver%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F%2FEmios_Pwm_Ip_InitChannel(EMIOS_PWM_IP_VS_0_I1_CH12_CFG%2C%20%26amp%3BEmios_Pwm_Ip_VS_0_I1_Ch12)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EEmios_Pwm_Ip_InitChannel%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EEMIOS_PWM_IP_SA_I1_CH12_CFG%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%3EEmios_Pwm_Ip_Sa_I1_Ch12%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F*%20Set%20new%20period%20for%20the%20channels%20that%20used%20external%20counter%20bus%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EEmios_Mcl_Ip_SetCounterBusPeriod%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EINSTANCE_1%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20CHANNEL_23%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E15000%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EEmios_Pwm_Ip_SetDutyCycle%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3EINSTANCE_1%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20CHANNEL_12%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E7500%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F*%20Using%20duty%200%25%20and%20100%25%20to%20blink%20LED%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Ewhile%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3Ereturn%3C%2FSPAN%3E%3CSPAN%3E%20exit_code%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3E%2F**%20%40%7D%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20HAVE%20WRITTEN%20THIS%20CODE%20TO%20GENERATE%20SIMPLE%20PWM%20SIGNAL%20WITH%20EMIOS1%20CH12%20ON%3CBR%20%2F%3EPTD6%20PIN%20OF%20%3CSPAN%3ES32K31XEVB-Q100%20FOR%20S32K311%2C%3CBR%20%2F%3EBUT%20I%20AM%20NOT%20GETTING%20ANY%20SIGNAL..PLEASE%20RESOLE%20AND%20HELP.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136942%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20eMIOS%20module%20of%20NXP%20s32k311%20mcu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136942%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3EI%20recommend%20you%20to%20read%26nbsp%3BS32K3_RTD_Training_eMIOS_public.pdf%20attached%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K311-EMIOS-GPT%2Fm-p%2F2063799%22%20target%3D%22_self%22%3ES32K311%20EMIOS%20GPT%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3ERobin%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22ACCEPT%20AS%20SOLUTION%22%20button.%20Thank%20you!%3C%2FP%3E%0A%3CP%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E