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.

Setting up GIO for tms570lc43?

I use tms570lc4357hdk.

GIOA[0] has deault terminal A5 and alternate R5 for input. However R5 is also listed under output.

There is also a different PINMMR setting to use it as input on R5 (PINMMR83[25]) as opposed PINMMR16[11] for output.

So what happens if you put PINMMR83[25] to 1 and PINMMR16[11] to 1?

To configure GIOA[1] as input on R5, do you need to set:

PINMMR83[24] = 0

PINMMR83[25]  = 1

PINMMR16[11] = 0

or is it enough to set PINMMR83[25]  = 1?

  • Or this is decided by by first writing to the GIODIRA register? If configured as input then by default that be read from A5? But if 83[25] is set then R5 instead.

    What happens if you configure as output but choose another output function in PINMMR16[11]? Then there is no physical output configured?
  • Steffan,

    Out of reset, the device will use GIOA[0] on it's default location A5. There is in this case no need to program the IOMM module.
    The direction will be set within the GIO module itself and by default (out of reset) GIOA[0] will be an input.
    If you want to drive a signal, than you have to set the direction for GIOA[0] as output.

    The ball R5 is by default ETMDATA[28] The ETM data signal are always output. Using the ETM will not affect the usage of GIOA[0] on ball A5.

    Now if you want to use GIOA[0] on ball R5, you will have to change the default function of ball R5 from ETM to GIO.
    Now base on the direction of GIOA[0] within GIO module, you will be able to set it as input or output.

    Note: If a signal has a dedicated ball and you decide to use an alternate Ball (ex: GIOA[0] on ball R5) than when GIOA[0] is programmed as output, the signal will be visible on BOTH location (Dedicated and Altenate).
    For input, the selection is done via the IOMM to decide which of the dedicated or alternate ball will be used as input.
  • I see.

    I am still a bit confused though. 

    GIOA[5] is listed under outputs as: B5 and R9

    GIOA[5] is listed under inputs as: B5 and alt R9

    So they match.

    However, GIOA[0] is listed under outputs only as R[5] as alternative, there is no default location for it under outputs.

    However under inputs it is listed as A5(default) and R5 (alternate).

    What does this mean? Can it function only as input on A5 or is it a mistake that it is not listed under outputs as A5 as well?

  • And what is the difference between setting PINMMR83[25] (R5 listed under input) or PINMMR16[11] (R5 listed under output) since both will point out the R5 pad? Will choosing 83[25] force it to input and 16[11] to output?
  • Hi Staffan,

    The statement "However, GIOA[0] is listed under outputs only as R[5] as alternative, there is no default location for it under outputs" is not correct. GIOA[0] has A5 as dedicated output ball. It has output multiplexing only on R5 ball. Since A5 is a dedicated GIOA[0] pin which is not tied to any other module, it does not require output multiplexing.

    GIOA[0] can take input from either A5 or R5 (as configured in PINMMR83) .
    GIOA[0] will always give output on A5. You can choose whether the ouput should also be visible on R5 (as configured in PINMMR16).

    Thanks and Regards,
    Vineeth

  • Hi Staffan,

    The direction register of the GIO module determines whether GIOA[0] acts as input or output.

    If GIOA[0] is set as input, PINMMR83 determines whether the input should be taken from R5 or A5.
    If GIOA[0] is set as output, PINMMR16 determines whether the output should be visible on R5 (It will always be visible on A5).

    Thanks and Regards,
    Vineeth

  • I see. And just to clarify. Since GIOA[5] can be multiplexed for both inputs and outputs you can choose another function in both places so it is possible to make it not active at all.
  • Hi,

    That is correct for output muxing. GIOA[5] does not have a dedicated pin. So you can configure the IOMM such that it does not have an output pin for GIOA[5].
    For GIOA[5]  input, you can only choose where GIOA[5] should take the input from. It will either be B5 or R9 depending on PINMMR85[0:1].

    Thanks and Regards,
    Vineeth

  • So still some questions. Some pins listed under inputs that are not listed under outputs, for example, AD2EVT does not make sense to use as output, or is then a Digital-to-Ananlog instead?

    Can it be set as an output and does that make sense to do?

  • And all pads listed under default terminal for inputs that is not listed under outputs are by default outputs?
    So for AD2EVT, the default is output on T10?
  • Also, some pins like LIN_RX () does not make sense to configure as output but is it still doable?
  • Hi Staffan,

    The ADxEVT pins can be used as an event trigger (input) for the ADC to trigger the event group conversions or it can be configured as a GPIO where it could be either an input or output. When this pin function is moved from its default terminal (T10) to its alternate terminal (V10) the input mux is used to insure the input on T10 does not influence the AD2EVT behavior.
  • Hello Staffan,

    To address your last two posts, the input and output mux definitions in the context of the IOMM module have nothing to do with configuring the functional pins as input or output. Each functional I/O has separate input and output buffers which connect to the "external world." The mux is used to connect these buffers to the module function/signal. In most cases, we only have muxes on output signals selecting the chosen function to the output buffer. In some cases where the inputs could impact behavior of such as when a function is moved from one terminal to another, an input mux is also necessary so that input behavior from an alternate function does not impact the function that was moved to another terminal.

    In regard to the functional signals or module IO, the direction is selected within the module registers. In some cases, the direction is defaulted to either input or output based on the function such as the ones you have mentioned (LINRX-->input, CANTx-->output, or AD2EVT-->input). However, in most cases, functional pins can also be configured as general purpose IO where they can act as simple inputs or outputs and not as LINRX or as an ADC trigger for example.

    In summary, the IOMM module is used to configure the connection of functional signals to a physical pin. These signals are going to be either input and/or output signals. The emphasis here is the connection of the signals not the configuration of the direction. Think of it as merely a switch connecting the internal logic to the physical world.

    In contrast, the direction of a functional IO or module pin, is configured within the module registers and impacts the configuration of the signal into or out of the module logic.