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.

AM2634: Please provide am2634 spi hardware register example code.

Part Number: AM2634

Tool/software:

Hi,

I am working on am2634 spi driver and application development.

Currently I used TI SPI API  for transmit from master to slave and could not achieve high speed timing based on our requirement.

So that please provide am2634 spi hardware register example code for achieving high speed transmit and reception.

Thanks & Regards,

Sadaiyandi.G.

  • Hi Sadaiyandi,

    1. Could you let me know what your requirements are?
    2. Did you refer to some example in the sdk, if yes? then which? And which SDK version are you using?
    3. What are you using as a slave device? Assuming AM2634 is being used as Master.
    4. You can refer to the mcspi_performance_8bit and mcspi_performance_32bit examples in the sdk, which demonstrate data transfer in master mode with performance measurement.

    Regards,
    Akshit

  • 1. Could you let me know what your requirements are?
    Our requirement is sending 1kb of data sending from master(TI) to slave (Holt IC - Arinc429) with in 12 milli second.

    2. Did you refer to some example in the sdk, if yes? then which? And which SDK version are you using?
    Yes, I referred spi example code in the sdk which interrupt mode and version is MCU+SDK for AM263X-09.02.00.55.

    3. What are you using as a slave device? Assuming AM2634 is being used as Master.
    slave (Holt IC - Arinc429)

    4. You can refer to the mcspi_performance_8bit and mcspi_performance_32bit examples in the sdk, which demonstrate data transfer in master mode with performance measurement.
    Yes, I tried mcspi_performance_32bit examples in the sdk also, but still i could not achieve of our requirement which is 1kb of data within 12 milli second.


    By using SPI SDK Api, I can tranfer the 1kb of data with 740 milli seconds, but actual requirement is 12 milli second.

    So, please provide register level example code for achieving our requirement (which means we can put the data into the SPI Data Buffer directly like that...).

    Thanks & Regards,
    Sadaiyandi.G.

  • You can refer to the source/drivers/mcspi folder for register and API's of MCSPI.

    You can also refer to TRM for more details on how to configure the MCSPI module.

    740milli seconds seems like a long time though, in the example test although without an alternate hardware, I was able to send 1024 words of 8bits each in 330microseconds.

    Could you share with me the MCSPI configurations you are using?

    Regards,
    Akshit 

  • Hi Akshit,

    Can you please share your code which how you sent 1 kb in 330 microseconds. Then i will try from my side also.

    And also i attached my spi configuration setting.

    Thanks and Regards,

    Sadaiyandi.G.

  • Hi Sadaiyandi

    I used the mcspi loopback example and configured it to send 1kb, you can also do a system project and make one of the mcspi peripherals the controller and other the peripheral.

    mcspi_loopback.zip

    Regards,
    Akshit

  • Hi Akshit,

    Okay I will do it and let you know if anything needed.

    Thanks & Regards,

    Sadaiyandi.G.

  • Hi Akshit,

    I can able to transmit 1kb data in 720 micro seconds at 5MHZ through spi and this much speed resolved my requirement.

    Thanks & Regards,

    Sadaiyandi.G.