Jump to content


  • Content Count

  • Joined

  • Last visited

  1. luligar

    Tiva TM4C GPIO pins with "two logic-high states"

    Hi mgh, It is indeed an amazing board, specially for the price! Shortly before your reply, I was sifting through these forums and I saw a thread about the 0 Ohm resistors you mentioned. I went back to the flyer and they show the pin pairs that are shorted in the signals diagram, but the resistors themselves, as R9, R10, were not mentioned. Sure enough, I took them out and one of my boards had its PD1 pin taken out , I guess after I tried using the stronger current drivers . On my second board, to my surprise, all 4 pins were fine! I don't see how to close an issue, if that is even intented in this forum. But I consider it closed and solved. Thanks for your quick and kind reply! Regards, Luis
  2. Hi, I'm getting to grips with a Launchpad ek-tmc123gxl board, and so far it looks amazing. However I have hit a snag which is pretty painful. Consider the following code: #include <stdbool.h> #include <stdint.h> #include "inc/hw_gpio.h" #include "inc/hw_memmap.h" #include "inc/hw_sysctl.h" #include "inc/hw_types.h" #include "driverlib/gpio.h" #include "driverlib/pin_map.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/sysctl.h" void setup(void); #define delay(x) SysCtlDelay((SysCtlClockGet() / 3000000) * x) uint8_t sequence_1[16] = { 0x4b, 0x4e, 0xcd, ... other 8-bit values }; uint8_t sequence_2[16] = { ... another list of 16 8-bit values like sequence_2 }; int index; int main() { int i, wait; setup(); index = 0; wait = 1000; while(1) { delay(wait); GPIOPinWrite(GPIO_PORTB_AHB_BASE, 0xFF, seq_m1[index]); GPIOPinWrite(GPIO_PORTD_AHB_BASE, 0xFF, seq_m2[index]); if(++index == 16) index = 0; } void setup(void) { // Set the clocking to run directly from the PLL at 80 MHz. SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlGPIOAHBEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); SysCtlGPIOAHBEnable(SYSCTL_PERIPH_GPIOD); GPIOPinTypeGPIOOutput(GPIO_PORTB_AHB_BASE, 0xFF); GPIOPadConfigSet(GPIO_PORTB_AHB_BASE, 0xFF, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); GPIOPinTypeGPIOOutput(GPIO_PORTD_AHB_BASE, 0xFF); GPIOPadConfigSet(GPIO_PORTD_AHB_BASE, 0xFF, GPIO_STRENGTH_8MA, GPIO_PIN_TYPE_STD); } I am seeing how pins D0 and D1 and B6 and B7 show the following scope trace: Where a normal binary squarish wave should be seen, I'm getting two high states, one at 1.85 V and another at the nominal 3.3 (!). I provide the facts below for context: The Launchpad board is brand-new. This behavior is also what I get when using an equivalent Energia sketch. None of the Port B or D pins are connected to anything. Just to the scope probes. This code is compiled on CCSv6 and arm-gcc. Same behavior. The usage of the AHB was just a "what if..." decision. The behavior is just as present when using the default APB. I suppose I'm missing a very big catch in dealing with the ports, but I thought the TivaWare drivers were written precisely to avoid this sort of unexpected and annoying behavior? As a more basic test, I made a program that toggles all bits of Ports B and D after a 2 ms delay. In that case, the scope showed a clean square wave. The ports configuration is identical to what I showed above. Thanks for the attention!