This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 nanosecond delay for E-Ink display

Hi all

I have issues with E-INK display for signals I need 100ns and 500ns delays but in nrf delay is only nrf_delay_us()

What is easiest way to get nano delays with nrf52832??? I have searched forum but no luck(as nobody needs such crucial timing)

Please help :)

Parents
  • I don't have a copy of an SDK handy at the moment, but a quick web search on nrf_delay_us() suggests that it is implemented as a sequence of NOP instructions. The references I found looked like some loop control overhead and 12 NOPs per microsecond.

    If you hunt up the source for nrf_delay_us() in your copy of the SDK, then make a couple of copies of that function, you ought to be able to create something near nrf_delay_100ns() and nrf_delay_500ns() by removing some number of the NOPs.

    You may need to dig out a scope or a logic analyzer to help you determine the right number of NOPs and/or the effect of removing/not removing the loop control code.

    Cheers!

    --- ta2

Reply
  • I don't have a copy of an SDK handy at the moment, but a quick web search on nrf_delay_us() suggests that it is implemented as a sequence of NOP instructions. The references I found looked like some loop control overhead and 12 NOPs per microsecond.

    If you hunt up the source for nrf_delay_us() in your copy of the SDK, then make a couple of copies of that function, you ought to be able to create something near nrf_delay_100ns() and nrf_delay_500ns() by removing some number of the NOPs.

    You may need to dig out a scope or a logic analyzer to help you determine the right number of NOPs and/or the effect of removing/not removing the loop control code.

    Cheers!

    --- ta2

Children
No Data
Related