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

6 Mbps on SPI.

Hello. I'm working with the nrf52 with s132 loaded. There is a way to have a 6Mbps on the SPI ? I try the value 0x60000000 but this do not work. Thanks. Eric Provost.

Parents Reply Children
  • @Håkon The FREQUENCY register is not defined that way in the datasheet. Can you provide more details of how you came up with 0x48000000 as the value to get a divide by 3? Is it possible to get a divide by 1 and run at 16MHz? What other values are possible in this register?

    I am a little dumbfounded as to why the NRF51 has a 4MHz bus from a 16MHz main clock (div of 4) but the NRF52 has only a 8MHz bus from a 64MHz main clock (div of 8). 8MHz can be rather limiting, not to mention the 255 byte DMA cap and delay between clocks on the shortcut.

  • Hi Tim, The nRF51x22's SPIM is sourced by the 16M clock tree, as most other bus-peripherals, but we've seen that the physical aspects (trace length, capacitance etc) limits the speed to approx 4 MHz, as we have timing requirements to meet on the bus signals. The nRF52 has a bit more special setup wrt. clock sources. QSPI, PWM, and I2S are all sourced from a 32M clock source, while UART/SPIM/I2C/TIMER are sourced from 16M. You'll have to take into account that the peripheral running at F, can provide a maximum output of F/2. A timer running with 16M source will be able to generate a event every 8 MHz for instance.

    No, it's not possible to output the source frequency (16M), as setting '1' in the prescaler will actually be prescaler+1, which will be a divide by two. Cheers, Håkon

  • Thanks for the answer. I was assuming you were based off a 32MHz clock, this explains things. When you say QSPI, do you mean QDEC? I'm not seeing a QSPI peripheral in the datasheet.

    Also, we have had good luck with the 8MHz SPI. But we have custom designs which are very well done.

    I suggest on the nRF53 or next rev of nRF52 that a faster SPI bus is used and you consider a DMA model that allows longer transactions and remove the delay between DMA transactions.

  • QSPI is only for the nRF52840, sorry for the mistake! Thanks for the comments, I'll relay your comments to the correct personnel internally. We're always open for feedback on our devices!

Related