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.

TMS570LS1224: ADC and GIO pin assignment

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

I was wondering what will happen if I attempt to use certain pins as ADC which have already been used by other pins in HalCoGen? No conflict shows up in the PINMUX setting, but will the ADCInit call basically override whatever setting comes first? If so, it would be nice to have an overall pin assignment window of some sort.

Similarly, there are only GPIO settings for 8 of the pins in HalCoGen, but is there any easy way to set up other pins and access them using APIs or do I have to work directly with the registers?

Thanks.

Eric

  • Hello Eric,
    Setting pins in different mode (MIBADC, MIBSPI and so on) makes possible using some of them as GIO and other as functional. For example: If you enable ADC module on TMS570LS1224ZWT package device, you can set ball N19 and V10 as GIO. All others could not be used as GIO (Table 4.20 of device datasheet).
    Let's take a look at balls V8, W8 and V9. When ADC module is enabled we can't use them as a GIO. But if we are using them when MIBSPI is enabled (not ADC) then we can set them as a GIO (Table 4-31 of device datasheet).
    If we want to use them as a GPIO when MIBSPI mode is enabled then using HALCoGen MIBSPIx Port TAB we need to select GIO mode of corresponding pin. Then we should enable MIBSPIx peripherals in PINMUX tab and clear any conflicts that appears. Also we need to enable MIBSPIx Driver from MIBSPI driver TAB. After MIBSPI is initialized in code we can use this pins as a GIO using APIs.
    For example: if ( gioGetBit(mibspiPORT3, 0) == 0));
    mibspiPORT3 in this example should be defined as: #define mibspiPORT3 ((gioPORT_t *)0xFFF7F818U)
    Hope this helps.

    Best regards,
    Miro
  • Hi Miro,

    That makes things very clear, thank you for the detailed explanation:)

    Eric