Hello all,
I need to make a gpio pin low and need to wait for 10ms and again another gpio as high and need to wait 100ms. How can I do this in s32k358 can someone explain?
Hi @Gunasekar,
It depends on your application, but you can either use Systick with the OSIF RTD driver, any of the timers (such as PIT, RTD includes the Pit_Gpt_Ip_Example_S32K358, which toggles a LED each second), or a simple blocking delay as the one declared in the Siul2_Dio_Ip_Example:
void TestDelay(uint32 delay)
{
static volatile uint32 DelayTimer = 0;
while (DelayTimer < delay)
{
DelayTimer++;
}
DelayTimer = 0;
}
Best regards,
Julián