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.

TMS320F280025: XTAL GPIO Ignoring Writes

Part Number: TMS320F280025
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Hello,

I have a custom design based around the 64 pin F280025. I've noticed I cannot read from the on-board microSD card using the FATFS module in C2000Ware, which I have done successfully on a different custom design using a similar C2000 device.

Probing the board, it seems the chip select line of the SPI bus used to interface with the microSD card never goes low, but my debug breakpoints and heartbeat LED tell me the code is indeed executing. Here is what I tried/verified:

- verified the pinout is correct

- Tried assigning a different GPIO handle to this pin and manually writing this pin low (the SD card is the only peripheral on this bus)

- depopulating the pullup resistor that was on this line

- Toggling other GPIO pins in the design to verify I do in fact have GPIO control. This was successful.

Nothing I have tried has made this GPIO pin go low. It stays at a constant 3.3V. This pin is one of the XTAL pins (GPIO19_X1, pin 42). It is almost like any write commands are being blocked. Any way the controller thinks these pins are in external oscillator mode? I have derived the clocktree so that no outputs are derived from external clocks, and no external clocks exist in the design. 

I am using C2000Ware 5.0, and recently ran an update check to verify packages are up to date. It does not seem to let me upload the sysconfig file to this post. I will try again if that is helpful. 

Any tips?

Thanks

Jesse

  • Hi Jesse,

    Thanks for your question.

    See this thread here, typically this is a pinmux issue: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1079047/tms320f280025-i2c-on-xtal-pins-not-working-gpio18-gpio19

    Can you verify you're using the right defines for your pinmux?

    Also, can you try doing the basic gpio_ex2 toggle, first with the default pins, and then try with GPIO19? Basically, we need to see if we can get ANY of the GPIO examples working first (even if they're different GPIOs) then debug the GPIO19 pin.

    Regards,

    Vince

  • Hi Vince,

    Thanks for the reply. That post you mentioned is interesting. Could these defines be incorrect even though they are generated by the sysconfig GUI? I will verify they are accurate.

    I do know I can toggle other GPIO pins in this design as is. I have written GPIO write commands to toggle a pin tied to an LED. The LED toggles accordingly. I will still try with the basic example and see if that allows me to toggle GPIO 19.

    Thanks

    Jesse

  • Hi Vince, 

    I loaded the GPIO_ex2_toggle example. The example could toggle the LED pin in my design, but could not toggle the GPIO19_X1 pin. 

    I have also tried toggling GPIO_18_X2. Neither of the XTAL pins are writable on my controller. I have tried multiple other pins in the design and all function as expected. I have verified continuity to ensure these pins are properly soldered.

    Even though I am defining these pins as GPIO's in the sysconfig tool, it still seems like the controller thinks these pins are inputs for the XTAL feature.

    In that post you linked, the TI Expert stated: 

    "

    Sandeep,

    Apart from that, you would need to remove any crystal/clock connections on these pins and may have to switch off the crystal functionality from system control registers to use these pins as I2C pins

    Regards,

    Praveen

    "

    Is there information on how I can do this?

    Thanks

    Jesse

  • Hi Jesse,

    Is there information on how I can do this?

    Just to make sure, can you make sure all of the following is done in your code?

    * you have the following somewhere in your code: GPIO_setPinConfig(GPIO_18_GPIO18_X2);

    * made sure that you are using INTOSC as your clock source (device.h should have that).

    * Made sure "XTALCR" register is set to "Oscillator off" as mentioned in the TRM (this one may be your issue)

    Regards,

    Vince

  • Hi Vince,

    Yes it looks like the XTAL was somehow being enabled. I found this function generated in sysctl.h that disables the external oscillator:

    SysCtl_turnOffOsc(SYSCTL_OSCSRC_XTAL);

    Calling this before executing my main routine allows me control of those pins as expected.

    Still unsure why or how this got enabled in the first place. One would expect if I am using the sysconfig tool to configure those pins as GPIOs, that I would want the external oscillator default disabled, but perhaps that is an unsafe assumption.

    Regardless, thank you for the help!

    Sincerely,

    Jesse