Skip to content

Invalid usage of k_busy_wait() #11935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pizi-nordic opened this issue Dec 7, 2018 · 1 comment
Closed

Invalid usage of k_busy_wait() #11935

pizi-nordic opened this issue Dec 7, 2018 · 1 comment
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@pizi-nordic
Copy link
Collaborator

Describe the bug
Most of the timing APIs in Zephyr uses ms as a time unit. There are also several macros, which converts other time units to milliseconds. However the k_busy_wait() uses us as a unit, so all these helpers cannot be directly used with this call. Unfortunately this subtle difference is missed in few places in Zephyr.

  • drivers/display/ssd1673.c: k_busy_wait(SSD1673_BUSY_DELAY);
    The SSD1673_BUSY_DELAY is specified in ms according to comment before this define.
  • tests/kernel/interrupt/src/nested_irq.c: k_busy_wait(K_SECONDS(..));
    (refereed in tests/kernel/interrupt is failing on NRFx boards #10509)
  • drivers/wifi/winc1500/wifi_winc1500_nm_bsp.c: k_busy_wait(u32TimeMsec * MSEC_PER_SEC)
    This one works as expected, but IMHO should be corrected.
@galak galak added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug labels Dec 8, 2018
@nashif
Copy link
Member

nashif commented Feb 11, 2019

  • drivers/display/ssd1673.c: k_busy_wait(SSD1673_BUSY_DELAY);
    The SSD1673_BUSY_DELAY is specified in ms according to comment before this define.

was fixed by d0afacc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

5 participants