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.

Set non-gio Pins for gio #TMS570LC43x

Other Parts Discussed in Thread: TMS570LC4357

I want to set non-gio pins for gio because of shortage of gio pins.

But how can I know the pin is correspond to which pin in the launchpad?

I have also met another problem.

I want to set mibspi1 for gio, 

gioInit();

gioSetDirection(mibspiPORT1,0x01);

gioSetBit(mibspiPORT1,0x01, 1);

However this code can not output high level voltage in the launchpad pin "MIBSPI1NCS[0]"

Hoping for an answer.

  • Now I add

    mibspiREG1->GCR0 = 1U; and change gioSetBit(mibspiPORT1,0x01, 1); to gioSetBit(mibspiPORT1,0, 1);

    And the pin is working ok.
    However, when I change the code gioSetDirection(mibspiPORT1,0x01); to gioSetDirection(mibspiPORT1,0xff);
    and try to use other pins such as gioSetBit(mibspiPORT1, 1, 1); and gioSetBit(mibspiPORT1, 2, 1);
    None of them other than pin 0 work.
    I don't know why.

    My now code is

    mibspiREG1->GCR0 = 1U;
    gioSetDirection(mibspiPORT1,0xff);

    gioSetBit(mibspiPORT1,0, 1);
    gioSetBit(mibspiPORT1,1, 1);
    gioSetBit(mibspiPORT1,2, 1);

    only pin 0 works.
  • This could be a pin multiplexing issue.
    It could be a SPI configuration issue - if the function is set to SPI and not to GPIO.

    If you open the debugger and view the MibSPI registers you can directly change the values of the SPIPC registers.
    Try making sure that the function is set to GIO and that the direction is output and then try changing the data output.

    Also please look at the register description for these pins in the TRM. The pins are distributed across the register and not all together.

    Last if you cannot move the pin by doing this - you should check the pinmux register that controls the pin that you are looking at.
    That needs to be selecting the MibSPI1 function not another function.
  • Thanks for your reply.
    What do you indicate for TRM? I have not used it. Is it a doc?
  • user4178447 said:
    What do you indicate for TRM? I have not used it. Is it a doc?

    TRM is an abbreviation for the Technical Reference Manual document. There is a link to the TRM on the User guides section of the TMS570LC4357 product page.