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.

TM4C123GH6PZ and pin_map.h

Other Parts Discussed in Thread: TM4C123GH6PZ

The latest version of Tivaware has a pin_map.h file that appears to be missing the USB0 DP and DM pin definitions for the TM4C123GH6PZ part. When using the Pinmux application, it generates the following as part of the pin initialization:

//

// Enable port PJ0 for USB0 USB0DM

//

MAP_GPIOPinConfigure(GPIO_PJ0_USB0DM);

MAP_GPIOPinTypeUSBAnalog(GPIO_PORTJ_BASE, GPIO_PIN_0);

//

// Enable port PJ1 for USB0 USB0DP

//

MAP_GPIOPinConfigure(GPIO_PJ1_USB0DP);

MAP_GPIOPinTypeUSBAnalog(GPIO_PORTJ_BASE, GPIO_PIN_1);

However, there is no definition for GPIO_PJ0_USB0DM or GPIO_PJ1_USB0DP in pin_map.h or anywhere else I can find.

Is this an oversight? What should the value in pin_map.h be?

  • Feel (and read) your pain.

    Clearly you're smart enough to "force code" the proper encodings - using your known good examples as models.  Had you tried?  Results?

    Should that fail - may I suggest quick search/scan of last StellarisWare - just in case.  (this assumes that - that port - those pins - were active in USB mode for certain, past LX4F MCUs...) 

    Our group continues to avoid this rebrand SW issue for this - and other (issue related) reasons...

  • Thanks for your confidence in me, however misplaced. It's not defined in StellarisWare either.

    When an A/D pin is needed, I just define the pin type as ADC. The Pinmux utility appears to do the same thing, but with the addition of messing with the pin mux. Do I really need to do that, since I define it as USB Analog anyway? I am concerned because the pins are defined as not being 5V tolerant.

    I'll do more reading of the data sheet and see if I can get an answer. I was hoping someone had seen this, but apparently few people use this part's USB interface.

  • It appears to be a bug in the Pinmux utility, generating more code than is necessary. If I remove the GPIOPinConfigure instruction the port seems to come up, though I have other issues to deal with.

  • Well answered - you've exhausted my laundry list of suggestions.

    Along similar lines (maybe) we've noted that both our LX4F and clone TM4C do not require, "GPIOPinConfigure()" sometimes (especially when that port/pin are employed in some analog (but not ADC) mode.)  To make that hodge-podge sentence bit more understandable - we've established no benefit from "GPIOPinConfigure()" when configuring pins as analog comparator inputs!  Perhaps that echoes - or is properly reflective - of your issue...

    As always - KISS serves well as your guide - single change - log results - then repeat...

    Bon chance, mon ami.

  • The data sheet says the pins come up as tri-state until configured except for a few pins. I correctly assumed that by configuring them as USB (an analog function) I would not need to worry about configuring any digital function and could remove that instruction. I'm sure that's the case with any pin configured as an analog function. Exceptions for this part are UART0, SSI0, I2C0 and JTAG pins.

    Thanks for your responses.