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.

Sysbios McSPI documentation

Other Parts Discussed in Thread: SYSBIOS

Hi, I would like to use the SPI1 port on my ICEV2 board. I see there's some drivers in the sysbios routines for configuring the SPI, but I don't find any documentation. I did find some documentation in the starterware section for some of the McSPI drivers, but I've been told the starterware doesn't work on the ICEV2.

 Can you please tell me what the parameters mean in the following (from osdrv):    McSPIMasterModeConfig(baseAdd,chMode,MCSPI_TX_RX_MODE,MCSPI_DATA_LINE_COMM_MODE_1,chNum);

Especially the MCSPI_DATA_LINE_COMM_MODE_1 value. It appears this routine takes a value 0-7 but there's no description of what those modes mean.

From the starterware API reference:

'pinMode' can take the following values.\n MCSPI_DATA_LINE_COMM_MODE_n - Mode n configuration for SPIDAT[1:0].\n For pinMode 0 <= n <= 7.\n

But SPIDAT[1:0] is a 2 bit field. How can n be 0-7?

Is there any documentation on the osdrv and/or platform routines provided in sysbios SDK?

Thanks.

  • Bob,

    As this question is really specific to the StarterWare component, I went ahead and moved this thread over to the device forum in hopes that it will get a faster response there.
  • Moving this to the Starterware forum.
  • Very funny to observe how posts are shifted among several forums.. :-)
    Instead of just moving threads, how about some information where to get the documentation?

    Go to the definition of MCSPI_DATA_LINE_COMM_MODE_1 in your header, and compare the value against the technical reference manual (TRM) of the AM335x processor chapter 24 (page 4774), that's the best source for hardware peripheral documentation.

    AM335x Sitara Processors Technical Reference Manual (Rev. L): www.ti.com/.../spruh73
  • I agree with the shifting comment. I get the starterware guys telling me starerware isn't compatible with my board, then when I ask a question here, they move it to starterware forum. VERY VERY frustrating dealing with Ti tech support using these E2E forums. Get bounced around 2x and 48 hours before getting any answers. I guess they don't realize there's money being burned waiting for them to respond.  Is there a "I don't like this tech support model" forum?

    As for the original question, I think I have figured it out after going through each routine and lines and lines of code. "Self documenting code" doesn't apply here :)

    Another issue I'm having is I can send SPI data but I cannot get the CS line to work correctly in SPI mode. I can toggle the line as a GPIO, but I would expect the SPI section to control this line automatically, not having to manually control it in code. What's the point? Can just use GPIO for that. I'll be posting this as another question and see where it gets bounced to.

    Thanks.