1

How can I prove __udelay() is working correctly on my ARM embedded system?

view story
linux-howto

http://unix.stackexchange.com – We have an ARM9 using 3.2 kernel - everything seems to work fine. Recently I was asked to add ad some code to add a 50ms pulse some GPIO lines at startup. The pulse code is fine, I can see the lines go down and up, as expected. What does not work the way I expected is the udelay() function. Reading docs makes me thing the units are in microseconds, but as measured in the logic analyzer it was way too short. So I finally added this code to get 50ms. // wait 50ms to be sure PCIE reset takes for (i=0;i<6100;i++) // measured on logic analyzer - seems wrong to me!! { __udelay(2000); // 2000 (HowTos)