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.

LAUNCHXL2-RM57L: Issue Configuring MibSPI2 with External SPI SD Card Reader

Part Number: LAUNCHXL2-RM57L
Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357

Hi,

I am trying to get the MibSPI2 Proto Header pins to allow me to connect an external SD Card reader. I have configured the MibSPI2 pins for use via the HALCoGen code generator. As I understand it the proper pin setup and usage should be as follows:
*                   RM57x LAUNCHPAD requires external connection to SD Card Reader
*                   ------------------------------------------------------------------------------
*                   |     SD PIN   |   SIGNAL NAME   | SIGNAL SW PIN | HEADER PIN |
*                   ------------------------------------------------------------------------------
*                   |    CS        |   MIBSPI2 CS0   |      N3       |  J9  P20   |
*                   |    SCK       |   MIBSPI2 CLK   |      E2       |  J9  P17   | 
*                   |    MISO      |   MIBSPI2 SOMI  |      D2       |  J10 P46   | 
*                   |    MOSI      |   MIBSPI2 SIMO  |      D1       |  J9  P22   | 
*                   |    VCC       |   +3V3          |      xx       |  J9  P3    | 
*                   |    GND       |   GND           |      xx       |  J9  P2    | 
*                   ------------------------------------------------------------------------------
*                   |   ~ENA~      |   MIBSPI2 NENA  |      D3       |  J10 P47   |

I am using a logic analyzer to monitor the signals on these pins. I am having some uncertainty with the Proto Header pins. In the Schematics J9 is on the left and J10 is on the right with pins 1 at the top. On the board itself I do not see any indicating markings of where pin 1 is. But the Proto Headers are labelled with J9 and J10 being in the opposite locations from the schematics is the label indicated Pin 1 (J9 on the right, J10 on the left).

Pinmux is being setup as follows in application:


    pinMuxReg->PINMUX[35u] &= ~(PIN_MIBSPI2ENA_MSK | PIN_MIBSPI2SOMI_MSK | PIN_MIBSPI2SIMO_MSK);
    pinMuxReg->PINMUX[37u] &= ~(PIN_MIBSPI2CLK_MSK | PIN_MIBSPI2NCS0_MSK);

                                                  /* Select SPI2 pinmux signals(Alternate Funct 4).    */
    pinMuxReg->PINMUX[35u] |= (PIN_MIBSPI2ENA | PIN_MIBSPI2SOMI | PIN_MIBSPI2SIMO);
    pinMuxReg->PINMUX[37u] |= (PIN_MIBSPI2CLK | PIN_MIBSPI2NCS0);

Using the HALCoGen configured pinmux file with the following setup:


    pinMuxReg->PINMUX[35] = PINMUX_BALL_D7_N2HET2_02 | PINMUX_BALL_D3_MIBSPI2NENA | PINMUX_BALL_D2_MIBSPI2SOMI | PINMUX_BALL_D1_MIBSPI2SIMO;
    pinMuxReg->PINMUX[37] = PINMUX_BALL_E2_MIBSPI2CLK | PINMUX_BALL_N3_MIBSPI2NCS_0;

Questions:

1. Is there an example project for this board that sets up any of the MibSPIx pins for use that I can check/run with my board to verify this even works?

2. What is the alignment of the Launch board so that J9 and J10 pins 1 can be identified properly with the schematics?  I may be overlooking something. As it stands I currently an getting signals for what I expect are the CS/MISO/MOSI/CLK signals as I have things hooked up. However, MISO is not responding to commands from MOSI. This makes me think I still may not have everything configured/hooked up properly. Currently, the side of the board with the Ether Plug is what I am assuming is the bottom of the Proto Header (Pin50) and the power USB plug is where Pin1 is.

3. Any other configuration setups that I may have overlooked when configuring the SPI pins? There are 7 overall pins being utilized by me for SPI comms:

  • CS
  • SCLK
  • MOSI
  • MISO
  • 3.3V
  • GND
  • ENA

Thanks,

Michael

  • Hi Michael,

    On the board itself I do not see any indicating markings of where pin 1 is.

    That is not true there is a pin number indicating where is pin 1.

    Even though they mentioned pin legending, i will also give another way to remember the pin order. The pin-1 of the connectors always starts from the USB connector side (like exactly as i highlighted on the pic), consider top side as USB connector side and pin count will increase from top to bottom. And you can also oberve one more thing that is all pins' pads are round in shape but only the legending given pads are square type. So just the pins (pin-1, pin21, pin-31 and pin-41) are in round shape and all other pins in the 48-pin connector are in round shape so just verify which last pin is in round shape and consider that pin as pin-1 because pin-48 is in round shape.

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Appreciate the info! The board we were sent already had a pin header soldered onto it for these two 50-pin side rails so I didn't see those square and circle shapes. That's very interesting to know though for next time so thanks for pointing that out. Looks like I did have the pins in the right place by assessing that the J9 J10 labels were where the pin1 side would be. I do see the 1's now. It was a bit covered up by the soldered pin headers and being so small I couldn't make out what it was. Now it makes sense though. I was so puzzled that I couldn't find some pin indicator anywhere. Really appreciate that. At least I can cross that off as being a potential issue now that I know the pins are right.

    Still hoping there is some example project or further info that can be referenced or recommended as my pin setup looks to be correct then but am still not seeing replies from MISO when MOSI is sending out the proper SPI command sequence to setup and communicate. Something to confirm the MibSPI pins work etc.

    Thanks,

    Michael

  • Hi Micheal,

    Still hoping there is some example project or further info that can be referenced or recommended as my pin setup looks to be correct then but am still not seeing replies from MISO when MOSI is sending out the proper SPI command sequence to setup and communicate. Something to confirm the MibSPI pins work etc.

    I don't have any MibSPI examples in RM57x.

    I just have few examples on TMS570LC4357, here are for your reference:

    2308.MibSPI_Master_with_ENA_TEST_LC4357.zip

    5123.MibSPI1_TEST_LC4357.zip

    3465.MibSPI1_TEST_LC4357 (2).zip

    7288.MibSPI_Slave_with_ENA_TEST_LC4357.zip

    The above all are working examples on TMS570LC4357. Just take them as reference and do the modifications in according to them.

    If still issue persists then just, try to send your complete project as a zip just like i am sending. So that i will debug your project at my end and will try to suggest necessary modifications.

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Appreciate the examples. So, I have an MibSPI project working on the RM57:x_HDK Hercules board. When I tried configuring it for the RM57_Launchpad with the HALCoGen tools, which essentially came out to be almost 1:1 with the HDK. The pins for MibSPI2 are the same routing between the boards and such. So, I was just curious if there was an example for that specific part to see if there was some bit setup I missed, overlooked etc. that is holding up the MISO communication line.

    All that said, I'll take a look at the examples and see if there's anything I can glean from that. Much appreciated. From what I could see there weren't any SPI examples for the Launchpad kit on the TI website. If not I can try uploading a copy of the project

    Best Regards,

    Michael

  • Hi Micheal,

    I don't have any MibSPI example on RM57.

    But one important thing is that, make sure ENA signal low to transmit data out of master. If you configured ENA signal then make sure to low the signal to transmit data out from master.

    And if possible attach your complete project to test it at my end.

    --

    Thanks & regards,
    Jagadish