FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [May 2008 Threads] Luminary LM3S6965 rev. C UARTPosted by Xasthur on May 28, 2008 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
RE: Luminary LM3S6965 rev. C UARTPosted by Dave on May 28, 2008 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.
RE: Luminary LM3S6965 rev. C UARTPosted by David Gesswein on May 29, 2008 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 initialized\n\r");
RE: Luminary LM3S6965 rev. C UARTPosted by Xasthur on May 29, 2008 @ 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
RE: Luminary LM3S6965 rev. C UARTPosted by Xasthur on May 29, 2008 (Correcting myself)
Port G is the end goal, but we'd tried switching ports as port G didn't SEEM to work.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|