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.

TMS570LS1227: How to read pins LIN_RX and LIN_TX as GPIOs

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN, , TMS570LS1224

I need to use pins LIN_TX and LIN_RX as GPIOs. I have to read both pins. What is the programming pattern to be followed?

1) in HALCoGen set pin TX and pin RX mode as GIO

2)  in HALCoGenset pin TX and RX direction as a read (clearing out checkbox DIR)

3)  in HALCoGen, tab driver, enable GIO driver

4) in my CCS project include "lin.h"

5) in my CCS project initialize gioInit()

6) read pin LIN TX with gioGetBit(linPORT, PIN_LIN_TX) and read pin LIN RX with gioGetBit(linPORT, PIN_LIN_RX)

Could you please double check if I'm correct? The problem I have I that I don't see what I'm supposed to read from LIN TX and RX

Regards

  • Hello,
    Assuming that you are using TMS570LS12x/11x Development Kit, LINRX and LINTX are connected to FT2232HL as well. That is possible reason for wrong readings.

    Best regards,
    Miro
  • Hello Miro,
    thanks for the reply. Indeed I have tested the LIN TX/RX on a TMS570LS12x/11x Development Kit, before moving to the TMS570LS1227.
    Could you please
    a) confirm me that I'm programming the LIN as GPIO correctly?
    b) how can I test the LIN as GPIO on the TMS570LS12x/11x Development Kit?
    Regards
  • Hello,
    Hercules TMS570LS12x/11x Development Kit ( www.ti.com/.../TMDX570LS12HDK ) is with TMS570LS1227 on board.
    Hercules TMS570LS12x LaunchPad Development Kit ( www.ti.com/.../launchxl2-tms57012 ) is with TMS570LS1224 on board.
    Your settings looks fine.
    SCILIN port on Hercules TMS570LS12x/11x Development Kit (HDK) is connected to J11 and to U27 (FT2232HL) - see the schematic ( www.ti.com/.../TMDX570LS12HDK - *.zip with board design files contains schematic diagram ).
    To isolate SCILIN from FTDI chip you can try removing R122 and R123.

    You could try using SCI port (not SCILIN) but then you should set pinmux as well (enable SCI box in HALCoGen->PINMUX tab).

    Best regards,
    Miro
  • Hello, I'm using TMS570LS12x/11x Development Kit (HDK).
    What happens if I remove R122 and R123? Do they have some side effect on something else?
    I cannot use the SCI port.
    Best regards
  • Hello,
    In TMS570LS12x/11x Development Kit (HDK) LINSCI port is used as console also (UART --> USB). If you remove resistors you will not be able to use this on-board bridge ( UART-->USB ). But you will still be able to use SCILIN port (GPIO or LINSCI) as it is connected to J11. If you decide to use SCILIN again as UART --> USB then you could solder again resistors or you could use external UART --> USB adapter.

    Best regards,
    Miro