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

nrf52832 spi (PSEL.SCK)

I use nrf52832 SPIM, and I want there are gaps between every 8clock, so I set  NRF_SPIM0->TXD.MAXCNT = 1; NRF_SPIM0->RXD.MAXCNT = 1; ,But there is alway more clock than I want,(I want to write 8clock, but there are 16clock), then the nordic engineer tell me to use PPI(setup_workaround_for_ftpan_58). now, the SPI work well , but I find another question, I must put P0.30 as output pin,and there is gaps between every 8clock, If I didn't config P0.30, there is not gaps between every 8clock, just like bellow,is that right?

I asked the quetion in https://devzone.nordicsemi.com/f/nordic-q-a/40522/nrf52832-spi-psel-sck-timing, but there is no reply.There are more details in the link.

Parents Reply
  • Thanks, the code is just as bellow:

    nrf52832_SPI_VTEST.rar

    In main.c , if I comment the following, there are not gaps between every 8 SPI SCK 

    //nrf_gpio_cfg_output(30);    // if pin30 is not set output and set1/clear0,spi sck is not right
    //nrf_gpio_pin_clear(30);
    //last_valid_cmd[0] = 0;

    If I not comment the following,there are gaps between every 8 SPI SCK 

    nrf_gpio_cfg_output(30); // if pin30 is not set output and set1/clear0,spi sck is not right
    nrf_gpio_pin_clear(30);
    last_valid_cmd[0] = 0;

    that's strange, I don't know what's the matter?

Children
Related