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

I want to delay between spi SCK per 1byte.

Dear all,

Hi, I'm Eric.

I m studying spi communication used nRF52832 base on SDK 14.2/example/spi.

That examsignal is below picture 1.

But I want to delay between SCK per 1byte used SPIM like 'picture 2'

Can you help me?

I hope to know what is setup for delay spi sck.

- picture 1 : My code signal.

- Picture 2. Sample code signal (SPI SCK, used STM32F334, HAL lib)

Sincerely yours

Eric.

Parents
  • Hi 

    You can use the combination of PPI/GPIOTE/RTC to delay the start of SPI master. But what exactly are you trying to achieve, do you need to configure the TXD/RXD buffer every time for every single byte transaction or is it just the SCK signal you worry about and do not need to change any buffer pointers?

  • Thank you for reple,


    I'm trying to communication to LTC6811 chip.

    I have tried SPI communication used three MCUs(ATmega, STM32F334 and nordic nRF52832).

    STM32, ATmega is working well, but nRF52832 is not.
    I have fined what is different between nRF52832 and STM32, ATmega.
    I fined that STM32 and ATmega output deleyed SCK signal, but nRF52832 isn't delayed.

    So, I  want to same SCK like ATmega and STM32's SCK signal.

    I m wondering how can deley SCK timing.


    Thank you.
    Eric

  • I do not understand why LTC6811 expects specific delay with the input clock for each byte. Are you really sure that this is the the reason for LTC6811 not to respond?

    Looking at the spec of LTC6811 did not reveal any such restriction

    That said, I do not think that you can control the transaction of a peripheral that includes multiple bytes with EasyDMA and delay the clock per each byte like this with that accuracy. 

  • Hi, thank you for reply.

    Because the working well MCUs(STM, ATmega) thare are SCK delay, I expected easyDMA. T.T

    I found out that have something not to do with EasyDMA last night.

    Last night, I found out it is difference between nRF52832 and another MCU(It is working well).

    That was receive buffer length.

    nRF52832 is received 12 byte, another MCUs are 8 byte.

    nRF52832 is when received from LTC6811, it is 0xFF first 4 byte.

    Another MCUs are not received 0xFF first 4 byte.

    1. nRF52832

    2. STM32F334

    I trying to find what is problem.

    And I attach scope signal nRF52 and STM32F334.

     

    1. nRF52832(Ch3(red) now output HIGH well.)

    2. STM32F334(It is working well)

    I need you help.

    Thank you.

    Eric.

  • It seems to me that the initial bytes are the causing the problem, most likely because your app have initiated the first byte transaction a bit too early. Seems like the slave device (LTC6811)

    Can you wait few milliseconds before you start the transaction and see if you get the same results? It is also good to double check the pin pull configuration on both ends.

Reply Children
Related