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

SPIM3 instance is not working at 8MHz also

Hi all,

I have customized application which is ported to both Nordic SDK 14.2 and Nordic SDk 15.0. In the app, we use SPI instance to read / write data from the sensor. When I have tested with SPI0/SP1/SPI2 instance at 8MHz , the application works fine with both Nordic SDK 14.2 and Nordic SDK 15.0.

But when I configured SPIM3 instance at 8MHz, the application loops in idle task only. Other tasks stops running.

When I configured SPIM3 instance at 16MHz, SPI CLK results in 16MHz for basic SPI read SDK example

But when I probed SPI CLK of customized application it results either in 16MHz / 625KHz.

Can you please help to resolve the issue?

Thanks in Advance!!

Regards,

Deepa

Parents Reply Children
  • Hi Vidar,

    I'm using nrF52840 RevB custom board and SDK 15.0.

    As stated I have a customized application which reads or writes data to slave device using SPI Instance.
    By enabling the NRFX_SPIM3_NRF52840_ANOMALY_198_WORKAROUND_ENABLED, customized application works fine when I configure SPIM3 at 8MHz.
    But customized application is not working when I configure SPIM3 at 16MMHz.

    I have observed that SPIM3 clock varies as either 16MHz or 625KHz when SPIM3 is configured at 16MHz with my customized application
    But I have also observed that SPIM3 clock is always 16MHz when SPIM3 is configured at 16MHz with my customized application which reads only device id of slave device in while(1) loop.

    Can you please help to resolve the issue?

    Thanks in Advance!!

    Regards,
    Deepa

  • Hi Deepa, 

    Please check if the SPIM3->IFTIMING.RXDELAY register gets overwritten during driver initialization. It should be '2' which is the reset value. If it's set to zero you may see that received data gets corrupted. 

    Regards,

    Vidar

  • Hi Vidar,

    Thanks for the help!! 

    I can able to resolve the issue and now SPIM3 is working with my customized application @16MHz.

    In my customized application, I was using both SPIM3 and SPIM2 instance. Due to hardcoded configuration, I was configuring both SPIM3 and SPIM2 instance @ 16Mhz which is incorrect as SPIM2 supports only 8MHz. After fixing this issue the customized application works fine.

    Regards,

    Deepa

Related