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.

TMS570LC4357: Miscellaneous IO Configuration

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hercules Friends and Family,

A few questions from our customer;  any input welcomed:

If I only need to use the MIBSPI4CLK pin as a GIO instead of a functional one, do we still have to Enable Driver Compilation?

NOTE:  We are only running in 3-Pin Mode.

2.    If I do have to enable the associated driver, but still only need to use the MIBSPI4CLK pin, does it make any difference if I configure the port for SPI Compatibility Mode or MIBSPI mode? I realize that if the other device we are communicating with only supports standard SPI that could change the answer but we are just trying to get familiar with the new system and understand best practices.

3.    In cases where a GIO signal is needed and two choices can be made (i.e. because both resources are available in the design), is there a recommended best practice? For example, either MIBSPI5SIMO[3] or DMM_DATA[11] could be used as the GIO as shown:

  

4.    It would be very beneficial, if it is not already available, to have a concise location/screen in HALCoGen that illustrates all the possible solutions for mapping a required GIO to a module/subsystem? See #3 above.

5.    Is there any general, as opposed to specific cases, TI produced Best Practices documentation available (i.e. without having to filter through the TI E2E Community site)?

 

(#5 can be addressed with TI Training, as noted)

Again, comments welcomed.

TY,

CY

  • Hello Chris,

    I will reply you later today. 

  • Hello,

    1. The SPI clock is required for 3-pin mode on both master and slave. Yes, you need SPI driver to initialize the SPI module. You can configure SPICLK pin as  GIO, and generate SPICLK by toggling GIO pin. But this is a good way to use SPI.

    2. If you use the drivers generated through HALCoGen, mibspiInit() is to initialize the MibSPI, and spiInit() is to initialize the SPI. You can use mibspiInit() for SPI compatible mode, and you need clear the MIBSPIE bit after calling mibspiInit(). To use mibSPI, you need to set the MIBSPIE bit, and configure the transfer groups which is not used by SPI. The HW connection between master and slave is the same.

    3. If you don't use mibspi parallel mode, you can configure MIBSPI5SIMO[3] as GIO. In no parallel mode, only MIBSPI5SIMO[0] and MIBSPI5SOMI[0] are used to RX/TX data.

    4. In pinmux panel.

  • QJ,

    Thanks, my friend!  Just a few quick follow-up replies and we should be able to close this out.

    To further clarify some of the questions:

     

    ·         Clarification for question #1: They will not be using the MIBSPI4 module for anything other than to harvest its GIO pin configuration assets (i.e. no SPI communication needed for that module).  Let me know if this changes your original answer?

    ·         Clarification for question #3: We may have done a poor job formulating this question. What they are looking for is that since Pin G17 can be mapped to 1 of 3 possible resources (i.e. MIBSPI5SIMO[3] or DMM_DATA[11] or ADIEXT_SEL[2]), and they currently could use any one of them, is there a preferred selection criteria?  One possible selection criteria they conceive is based on understanding from the TMS570LC435 Reference Manual the first one in the list is the default if nothing is configured either in HALCoGen or via startup application code directly. If that is correct perhaps that would support it as a possible selection criteria. Are there any others they should be aware of?

    This is also feedback regarding the tool --- and possibly one suggestion is a color-coded prioritization scheme for example, whereby different peripherals (such as ADC) be prioritized over others (such as UART) for the user to consider.

    ·         Clarification for question #4: Another part of formulating this question. What I was looking for was a path graphic that showed  when you select a driver on the Driver Enable tab, it shows you all the other possible settings that are then required to complete a valid configuration:

               Driver Enable
    àPin Muxingà>SPIxàSPIx Port

     This is more feedback on the HALCoGen tool itself, not so much a question.  Please consider and/or forward on to the team.

     TY,
    Chris

  • Hello Chris,

    I am sorry for late response.

    1. If you don't use MibSPI4 module, you use those pins as GIO either through MibSPI registers (SPIPC0, SPIPC1,...SPIPC8) or through the N2HET registers (DIR, DIN, DOUT,...). 

    • configure pinmux to select those pins (K18, U1, B12, T1, V7, D19, B4, V2, W5, V6) as MibSPI. Write 1 to GCR0 register to release MibSPI4 module from reset, then use PC0/.../PC8 registers for GIO operation
    • use default pinmux to select those pins as N2HET1, initialize GIOA and GIOB modules (gioInit()), then use GIO APIs to N2HET1 pin in GIO mode. For example,

    gioGetPort(hetPORT1)  to get the value of N2HET1[31:0] pins

    gioSetBit(hetPORT1, 0)  --> to set N2HET1[0] pin (MibSPI4_CLK pin)

    2. If there is an external SPI device connected t MibSPI5, when you use MibSPI5 pins as DMM_DATA function, please disable MibSPI. Otherwise, DMM_DATA[x] may enable the SPI device and program wrong data to SPI device.

    3. Thanks for your nice feedback. But we don't have plan to update the HALCoGen this year.

  • Thanks QJ!  Appreciate it my friend.

    -Chris