Luminary LM3S6965 rev. C UART

In using the demo board with the FreeRTOS Webserver Demo along with the libdriver interface provided by Luminary, We added the following code to main.c: Init code– SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); SysCtlPeripheralEnable( SYSCTL_PERIPH_UART1 ); GPIOPinTypeUART(GPIO_PORTD_BASE, (GPIO_PIN_2 | GPIO_PIN_3)); UARTStdioInit(1); Main Code– UARTprintf(pcstring); --or–         int i;         int j=0;         for (i=0;i<10;i++)                    /* set and clear pin 10 times */           {             UARTBool = UARTCharPutNonBlocking(UART1_BASE, ‘1’);    /* send ‘1’ */             if (UARTBool == false) {               while(1)    ;    //We never get to this….             }                        /* wait here on failure */             UARTBool = UARTCharPutNonBlocking(UART1_BASE, ‘0’);    /* send ‘0’ */             if (UARTBool == false) {               while (UARTSpaceAvail(UART1_BASE) == false) ;               while(1)    ;  //we always hit this….             }                        /* wait here on failure */             j++;           } It seems that we are able to both fill and clear the FIFO, but nothing came out of UART1, or UART2 (When we changed the code for that). The tx pin does get configured as an output and remains high. Any ideas? --Ian

Luminary LM3S6965 rev. C UART

Does your code work in the absence of FreeRTOS? I’m trying to understand if it is FreeRTOS that is stopping it from working, or whether the code just does not work for some reason anyway.

Luminary LM3S6965 rev. C UART

This is what I use for talking to the UART that is attached to the USB interface chip. I also have rev C with webserver demo. Not sure why yours isn’t working.  The UART peripheral enable is in UARTStdioInit but the extra call shouldn’t hurt anything.  I have the following code in prvSetupHardware after the SysCtlClockSet and portf initialization.         SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);         /* Configure the UART pins appropriately. */         GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);         UARTStdioInit(0);         UARTprintf("UART is initializednr");

Luminary LM3S6965 rev. C UART

@ davedoors: Using the example code that is provided with the libdriver (Without FreeRTOS), the UART seems to work. A quick comparison shows that the code I added to the FreeRTOS Demo is no different but seems to not work. @ djg: That’s interesting. I’m attempting to get it to work via port g, out of a "real" serial port. It seems like a nice way to do some printf’s for debugging. I will take another look at my code and see if I can tidy it up a bit, but this has been an ongoing problem. --Ian

Luminary LM3S6965 rev. C UART

(Correcting myself) Port G is the end goal, but we’d tried switching ports as port G didn’t SEEM to work.