Hi,NXP Expert,
l can not find mdelay function In sample code for i.MX8M Mini 's M4, if we need delay 1ms ,how to implement it ?
as below
void mDelay(iTE_u16 Delay_Count)
{
uint32_t i;
while(Delay_Count--)
{
for (i = 0; i < 1000; i++) {
__NOP();
}
}
}
but l am not sure how many __NOP() use ? how to compute it ?
thanks
Actually it depends on the compiler how it to realize this loop.
I can suggest to set some amount of NOPs measure the delay and then correct it.