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

SPI peripheral clock and frequency question

Hi Nordic Team,

I am using the nRF52840 for a project, and I am interfacing with an LCD using the SPIM3 peripheral.  I know there have been past posts on the Devzone which say that it is not recommended to use any other frequency for the SPI peripheral besides the ones provided (such as SPIM_FREQUENCY_FREQUENCY_M16), so I was wondering if there was any way to source the SPI peripheral from an external clock source instead? My LCD can use a 15MHz max clock, and I would prefer to run the LCD off 15MHz if possible for better performance, but the 16MHz frequency option is too fast and the 8MHz is too slow.  If not, is my only option to use either 8MHz or 16MHz, or would there be any other way to adjust the clock speed closer to 15MHz?

Thanks!

- Debbie

Parents
  • Hi,

    We have not tested anything other than the frequencies specified in the documentation for the FREQUENCY register. The supported frequencies can be exactly generated from the HF clock, so that you will have a stable clock signal with 50 % duty cycle.

    You can try to tweak the FREQUENCY register, but as you can see by checking the CLK signal on a logic analyzer it will not be very clean. It might not be OK for the internal timing of your slave device, and it might not be OK for the nRF SPIM peripheral itself. Moreover, even if it does work it might be that it is only just, so that it might fail in some occasions on some devices.

  • Hi Einar,

    Thanks for the quick reply.  Do you have more information on how I can tweak the frequency register?  I tried several various settings for the frequency register, but when it wasn't recognized as one of the preset frequencies, it seemed to always default to 32MHz.  Thanks! 

Reply Children
Related