This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: AM64x McSPI communication

Genius 3186 points
Part Number: AM6442

Hi

May I have question about AM64x McSPI?

Q1 :

I think there is dead time if use TI's API.

As this topic:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1234641/am6442-spi-dma-mode-transfer-consumes-more-time-before-starting-actual-transfer?tisearch=e2e-sitesearch&keymatch=spiTransaction.dataSize# 

Is this dead time will be short in newer SDK v9.1?

Q2 :

I think Q1's dead time is because the time of API setting McSPI's register.

If MCSPI_Transaction::count will set than 1, How was dead time of between transmit-frame1 and frame2?

I think dead time will be shorter because API not need re-config McSPI initialize setting.

Q3 : 

If change transmit frame size, Sould we only changing MCSPI_Transaction::dataSize?

Thanks,

GR

  • Hi GR,

    Thanks for your query.

    Please expect responses within few days.

    Thanks,

    Vaibhav

  • Hi Vaibhav,

    Thanks for your supporting.

    Is there any update?

    Best regards,

    GR

  • Hi GR,

    Thanks for your patience.

    If MCSPI_Transaction::count will set than 1, How was dead time of between transmit-frame1 and frame2?

    I think dead time will be shorter because API not need re-config McSPI initialize setting.

    Allow me sometime to comment on this.

    Q3 : 

    If change transmit frame size, Sould we only changing MCSPI_Transaction::dataSize?

    I would like to correct on this, so datasize is just meant to specify the number of bits. So I would recommend you to read the following.

    If you want to change the transmit size you would need to change the parameter 

    spiTransaction.count

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thanks for your supporting.

    Allow me sometime to comment on this.

    I understand. I will wait.

    If you want to change the transmit size you would need to change the parameter 

    spiTransaction.count

    you mean, If set "spiTransaction.count    = APP_MCSPI_MSGSIZE / (spiTransaction.dataSize/8);" or When the total amount of data to be transmitted is the same as before the frame size change?

    (this setting is MCU+SDK example mcspi_loopback_dma_am64x-sk_r5fss0-0_nortos)

    I think if not use spiTransaction.dataSize value as an argument of spiTransaction.count, or the total amount of data to be transmitted is not same as before frame size changed,  we not need change spiTransaction.dataSize.

    Because MCSPI_Transaction::count is frame count of transaction.

    Best regards,

    GR

  • Hi GR,

    I can explain in a much easier way with an example.

    So lets say controller is AM64x and peripheral is a sensor.

    My use-case is to read values(2 bytes) from the slave(peripheral).

    Lets say I want to read the register 0x43 from the slave.

    Hence, we would firstly point to this register 0x43 in the slave post which we can read from there.

    So the SPI Transaction would look like this.

    So the transaction parameters:

    TX BUFFER ---> [0x43, 0]

    RX BUFFER --> [0, 0]

    and here the spi.transaction size would be 2(as we are expecting 2 bytes of data to be read). So apparently it all boils down to the number of values you want to read.

    After the api MCSPI_Transfer() has been called, the receive buffer would loom like:

    RX BUFFER ---> [value1, value2]

    I hope this helps.

    Regards,

    Vaibhav

  • Hi Vaibhav,

    Thanks for your information.

    I understand that I need to change the value of count depending on what I want to communicate.

    Best regards,

    GR