/* 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.