xiaoxiang781216 commented on PR #14450: URL: https://github.com/apache/nuttx/pull/14450#issuecomment-2906883844
> ## Summary > > Currently up_ndelay & up_udelay are completely broken; they always sleep very long time (at least to the end of currently ongoing tick), due to the current time is obtained from "oneshot_current": > > ``` > ret = lower->ops->tick_current(lower, &tick); > clock_ticks2time(ts, tick); > ``` > @jlaitine, but up_ndelay & up_udelay call ONESHOT_CURRENT: ``` #define ONESHOT_CURRENT(l,t) \ ((l)->ops->current ? (l)->ops->current(l,t) : oneshot_current(l,t)) ``` which try to call current before tick_current, so do you implement current callback and what's your hardware time frequency? > This basically quantizes the time with tick time, causing really long looping > > This PR also sets a proper CONFIG_BOARD_LOOPSPERMSEC value for imx93-evk target. > ## Impact > This change break all devices which doesn't fine tune CONFIG_BOARD_LOOPSPERMSEC, but depend on ndelay_accurate. -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org