Content originally posted in LPCWare by on Thu Jul 12 01:12:15 MST 2012
Quote:
for(unsigned long ul = 0; ul < 0xfffff; ul++ )
{
}
The OP requested an accurate delay, and that is never going to be accurate.
The only way of a truly accurate delay is to use a hardware timer, as per somebody else's suggestion. You can use the SysTick for this before the FreeRTOS scheduler is started, but not after. The RTOS will re-configure the SysTick when it starts. However, you cannot use the SysTick interrupt as the RTOS interrupt handler needs to be installed.