S32K144EVB PWM Example getting errors in generated header and source file

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

S32K144EVB PWM Example getting errors in generated header and source file

384 Views
Coding_Torque-SDRS
Contributor III

Hi Community Members,

                       I'm working on the PWM example from S32K1 AUTOSAR 4.4 RTD 1.0.1 D2202 Example projects. When i use PAL based example its working fine but when I use MCAL based example it's throwing me errors in generated header/source file. Please provide me with a solution to work in MCAL based projects. 

                       For Pwm_example_S32K144 I've made changes in main file for 

/* Initialize the Mcu driver */
Mcu_Init(NULL_PTR); //0 Macro Expansion

/* Initialize the clock tree */
Mcu_InitClock(McuClockSettingConfig_0); //0U Macro Expansion

/* Apply a mode configuration */
Mcu_SetMode(McuModeSettingConf_0); //0U Macro Expansion

/* Set new period and duty cycle*/
Pwm_SetPeriodAndDuty(0U, 0x5000, 0x2000);

/* Increasing LED brightness, using Pwm_SetDutyCycle*/
Pwm_SetDutyCycle(0U, 0x7000);

/* Decreasing LED brightness, using Pwm_SetDutyCycle*/
Pwm_SetDutyCycle(0U, 0x200);

since 0U is the macro expansion for the Pwm_channel_0, NULL_PTR , . But there are other errors for 

const Mcu_DemConfigType Mcu_Dem_Config =
{
/* DEM error reporting MCU_E_TIMEOUT_FAILURE */
{(uint32)STD_OFF, 0U},
/* DEM error reporting MCU_E_INVALIDFXOSC_CONFIG */
{(uint32)STD_OFF, 0U},
/* DEM error reporting MCU_E_CLOCKMUXSWITCH_FAILURE */
{(uint32)STD_OFF, 0U},
/* DEM error reporting MCU_E_CLOCK_FAILURE */
{(uint32)STD_OFF, 0U},
/* DEM error reporting MCU_E_SWITCHMODE_FAILURE */
{(uint32)STD_OFF, 0U}
};

these in Mcu_Cfg.c. STD_OFF have macro expansion 0x00 in StandardTypes.h generated header file. and there are other errors same as this in other generated header/source files.

Since it's generated code I'm hesitating to do changes. 

                       Screenshots has been attached. Any help or lead would be appreciated.

 

Thanks,

SDRS

0 Kudos
Reply
1 Reply

305 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried to create new example as well, open mex file, click update code then changed Pwm_channel_0 to 0U and build project, no errors appeared, project can be compiled. So not sure what you did/changed.

BR, Petr

0 Kudos
Reply