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] [August 2013 Threads] simple UART Transmit and Receive on LPC1778Posted by John Gaffey on August 13, 2013 I am trying to do a very simple transmit and receive a char on UART0 I have this for transmit: void UART_Task_Init() { LPC_UART_TypeDef *UARTx = (LPC_UART_TypeDef *) LPC_UART0; UART_CFG_Type UARTConfigStruct; /* UART Configuration structure variable */ UART_FIFO_CFG_Type UARTFIFOConfigStruct; /* UART FIFO configuration Struct variable */
/* Initialize UART Configuration parameter structure to default state: * Baudrate = 9600bps, 8 data bit, 1 Stop bit, None parity */ UART_ConfigStructInit(&UARTConfigStruct);
/* Set Baudrate to 115200 */ //UARTConfigStruct.Baud_rate = 115200;
/* Initialize UART0 peripheral with given to corresponding parameter */ UART_Init(LPC_UART0, &UARTConfigStruct); #if 1
/* Initialize FIFOConfigStruct to default state: * - FIFO_DMAMode = DISABLE * - FIFO_Level = UART_FIFO_TRGLEV0 * - FIFO_ResetRxBuf = ENABLE * - FIFO_ResetTxBuf = ENABLE * - FIFO_State = ENABLE */ UART_FIFOConfigStructInit(&UARTFIFOConfigStruct); /* Initialize FIFO for UART0 peripheral */ UART_FIFOConfig(UARTx, &UARTFIFOConfigStruct); /* Enable UART Transmit */ UART_TxCmd(UARTx, ENABLE); #endif }
Followed by a:
UART_Send(UARTx, (uint8_t *)string, strlen(string), BLOCKING);
It seems to try and transmit: UART_SendByte(UARTx, (*pChar++));
the first character and then times out.
Is this the right path?
Also do you have a example receive? I could not find serial example for 1778.
RE: simple UART Transmit and Receive on LPC1778Posted by Richard on August 14, 2013 As we support hundreds of chips, with a massive range of peripheral IP, we are unfortunately unable to provide support on chip specific configuration (unless it is directly related to a FreeRTOS port). If the IP is the same as that used on the 1768 (which I think it is) then you will find a lot of serial port related code in the the FreeRTOS+IO product - which is a free download. Regards.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|