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.

LAUNCHXL-F28377S: SPI Output Test Problem

Part Number: LAUNCHXL-F28377S

Hello TI Community,

I am currently trying to get the SPI example loopback code (without interrupts) to output it's SPICLK onto a pin. I noticed that the only available "set" of pins on the LaunchXL that can be used are pins 14, 15, 7, and 8 which belong to GPIO58, GPIO59, GPIO60, and GPIO61. I looked into the "InitSpiaGpio" function to change the pin out and mux options. I comments out the code and added in "GpioCtrlRegs.GP(B)" registers with the same values described in the code except replaced GPIO16 to GPIO19 with GPIO58 to GPIO61. When I check GPIO60 for SPICLK, all I get is a constant high signal. Has anyone been able to output the SPI stuff onto the LaunchXL booster header pins?

  • Hi Brenden,

    The values have to change too. Did you do that? There's a multiplexing table in the datasheet that should tell you which values in the MUX and GMUX registers give you SPI on GPIOs 58-61:

    www.ti.com/.../terminal_configuration_and_functions

    Whitney

  • Hi Whitney,

    I noticed that the mux value on the mux table is 15 to get SPI on GPIO58 to 61. It didn't seem to work when I changed the value for "GpioCtrlRegs.GPBMUX2.bit.GPIO58" to 15. In debugging I noticed the value was being capped at 3 which makes sense as GPBMUX2 is a struct of 2 bit variables. I used the "GPIO_SetupPinMux" function from a different example code to get output from the header pins on the LaunchXL board. However, I am still curious as to what I am missing in the example code.

  • Hi Brenden,

    Yeah, the table can be a little confusing. It helps to look at the second and third rows instead of the "GPIO Index" row I think.

    That 15 actually refers to a combination of the values in the GMUX and MUX registers--15 is 1111b which means 11b should go in the GPBGMUX2.GPIO58 field and 11b should go in the GPBMUX2.GPIO58 field. To give another example, a value of 6 (0110b) means 01b should go in the GPBGMUX2.GPIO58 field and a value of 10b should go in the GPBMUX2.GPIO58 field. Does that make more sense?

    Whitney