This loop will be optimized out by the compiler on non-O0 builds, as the loop counter variable isn't volatile. Either make ui32Delay volatile, use the Contiki delay functions, or use some inline ASM NOP instructions to force the delay.