This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NRFX Timer in ns

Hi, 

I'm using the nRF9160 DK board with nRF Connect.

I want to create a driver for an LCD with a parallel interface. SPI is to slow for my project.

First, do you have examples using the parallel interface ?


Second, for this interface I want to return bits with a 16MHz frequency on GPIOs .Is it possible to have a timer with an interrupt every 62.5ns? or at least 125ns? 

I tried to use nrfx_timer_init() to create a timer. but the function to convert ns to ticks does not exist (only nrfx_timer_us_to_ticks() and nrfx_timer_ms_to_ticks() ). Is it not recommended to use a timer that fast ?


Thank you in advance, 

Elisa 

Parents
  • Hi Elisa,

    There is no interface on the nRF91 that is faster than SPI. And you write handling interrupt every 62.5 ns, and that is very optimistic, given that you actually want to do something, and also that the CPU sometimes needs to handle other tasks.

    Perhaps you can do this in a different way altogether? Can you explain more about what you want to achieve and which approaches you have considered?

  • Thank you for your answer. 

    I want to connect a display controller to my board. My purpose is to have an interface like a smartphone application, using the LVGL library.


    I looked at the ILI9488 driver with a 320*480 resolution. Since the SPI frequency on NRF9160 is 8Mps, transmit an image via SPI takes approximately 300ms. I would like something faster. The ILI9488 datasheet describe the possibility of using a parallel interface instead of a serial interface.

    Even an handling interrupt every 1us will be better than SPI, but with the NRFX timer the lower time interrupt I have is 5us. 

  • Hi,

    Even if there is a parallel interface on the ILI9488, there is no such thing on the nRF9160. SPI is the fastest option available on the nRF9160.

    A timer will not work here, as it is imply a timer. It seems like what you are describing is bit bangig (using a timer, CPU and GPIOTE and implement the protocol in software). That will most probably not work with such high data rates, as the CPU will not have time to do anything else. Remember that it is not enough to generate the interrupts, you need to do processing as well. Even though perhaps not much, there will be a bit.

    You are of course free to try to bit bang this if you want, but given the chances are it will not work as expected I suggest you consider other approaches (like using the display differently so that 8 MHz SPI is enough,  use another MCU for handling the display, or something else).

Reply
  • Hi,

    Even if there is a parallel interface on the ILI9488, there is no such thing on the nRF9160. SPI is the fastest option available on the nRF9160.

    A timer will not work here, as it is imply a timer. It seems like what you are describing is bit bangig (using a timer, CPU and GPIOTE and implement the protocol in software). That will most probably not work with such high data rates, as the CPU will not have time to do anything else. Remember that it is not enough to generate the interrupts, you need to do processing as well. Even though perhaps not much, there will be a bit.

    You are of course free to try to bit bang this if you want, but given the chances are it will not work as expected I suggest you consider other approaches (like using the display differently so that 8 MHz SPI is enough,  use another MCU for handling the display, or something else).

Children
Related