AnsweredAssumed Answered

S32DS blink LED

Question asked by Shashank Anand on Mar 24, 2018
Latest reply on Mar 26, 2018 by Jiri Kral

Mike Doidge

Hi Mike,

Based on your  "HOWTO: Create the Blinking LED example project using S32K144 SDK " I am trying to toggle all the three LEDs on the S32K144EVB_100  but I am not able to do it. 

Following is the code I am running on S32DS:

 

CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_FORCIBLE);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
PINS_DRV_SetPinsDirection(PTD,1<<15U|1<<16U|1<<0U);
PINS_DRV_SetPins(PTD,1<<15U|1<<0U);
PINS_DRV_ClearPins(PTD,1<<16U);
PINS_DRV_SetPins(PTD,1<<16U);

PINS_DRV_ClearPins(PTD,1<<0U);


for(;;){
int c=7200000;
while(c--);
PINS_DRV_TogglePins(PTD, 1<<15U |1<<16U|1<<0U);
}

 

with this code the toggling is happening between blue and yellow(red+green).

 

Please help.

 

Thanks

Shashank Anand

Outcomes