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.

MCSPI

Other Parts Discussed in Thread: AM3359, ADS1299

Hi,

we are using AM3359 as master mode

In our design we are using a GPIO line for CS, we are no where using CS of SPI modules.

But in our application if i dont use these below API's, my application seems to hang is these below APIs need to be used, even if we dont use the CS of SPI module??

MCSPICSEnable()

McSPICSAssert()

McSPICSDeAssert()

 

  • Hi Bindu,

    If a point to point connection is used to connect Master and Slave then CS is optional. So usage of the above mentioned APIs are not mandatory.

    May i know what is the exact behaviour i.e.

    1) Is McSPI transmitting data?

    2) Is the slave not able to latch the data?

    3) If the code is hanging where is the hang seen?

    Regards,

    Jeethan 

  • Hi Jeethan,

    1) Yes MCSPI Transmitts when CSEnable is used

    2) When CS Enable is not used, then it waits for the TX Data loded into shift register, Here it hangs

    Regards,

    Bindu

  • Hi Bindu,

    Can you check the schematics of the board and see if the CS of McSPI is being connected to the CS of slave. For e.g. in AM335x GPEVM Channel 0/CS0 of McSPI0 instance is hardwired to Flash and if this is the case in your board then it may not work

    Regards,

    Jeethan

  • hi jeethan

    I am working on am437x . I am facing some issues while working with spi3 . I know that mcspi driver parses the info given in dts file. My ADS1299 module is connected to spi3 and I am not able get the desired frequency for my ADS1299 module . I have parsed max-spi-frequency of 40MHz from dts file in the child node of spi3 . But when trying to set freq of 20MHZ in my struct spi_transfer and do the transfer using spi_sync in my module driver, My frequency only limits to max 12 MHZ . why is it so? How do I set frequency to my spi message transfer ? If I am passing max-clock-frequency = <40> under the child node of my device under spi3 node in dts file , where is this info getting passed into ,like which file ?

    thanks
    rahul
  • Hi Rahul,
    Are you working with StarterWare? If so which version?

    Regards
    Sandhya
  • Hi sandhya,

    No I am not working on starterWare . I working on slave spi driver which calls spi protocol driver(driver/spi/spi.c) functions .I know the data transfer is happening through spi master driver (driver/spi/spi-omap2-mcspi.c) . My only questions is , can I do a 24 bit data transfer in one single clock ? . When I say single transaction I also want my clock to be 24-bit , only then the my MOSI will get transferred. How do I do it ? . Is setting bits_per_word member of spi_transfer to 24 will make it work. Do I need to go with DMA transaction for that ? .

    Thanks
    rahul