patacongo commented on pull request #2464:
URL: https://github.com/apache/incubator-nuttx/pull/2464#issuecomment-738804687


   > @yjdwbj the change to `up_udelay` is incorrect as I mentioned. The driver 
should be using `nxsig_usleep`. I understand that when you used the usleep 
command at the `nsh` this likely means there is an issue with the system tick 
timer. With out this fixed most of the system will not function.
   
   The only way that nxsig_usleep() would hang is because the timer interrupt 
is not occurring OR because a bad timeout value is provided.  There is no other 
explanation.
   
   Perhaps the timer interrupt is no enabled.  Perhaps you are calling 
nxsig_usleep() too early in the initialization sequence.  nxsig_usleep() CANNOT 
be called from the board initialization logic because that is too early; that 
is BEFORE the timer or the interrupt system has been initialized.
   
   The board initialization logic is called early in boot-up from __start().  
The timer facility cannot be used until the OS has initialized, the interrupts 
have been initialized, and the timer has been initialized.  That happens a long 
time after board initialization; that happens when up_initialize() is called.
   
   Could that be the problem?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to