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] [October 2008 Threads] How to implement the Serial IrDA on LM3S6965 Posted by Bill Yang on October 30, 2008 Hi, I am not familiar to SIR IrDA and have a question regarding the Serial (or Slow) IrDA implementation over the LM3S6965 or any Cortex-M3 architecture. Current I worked on a project that has two infrared serial devices to connect to the UART1 and UART2 (or the IrDA port 1 & 2) on the LM3S6965, but I could not get them to Tx/Rx through a interrupt service routine. If someone has an idea how to configure and implement this UART port and can share a sample code with me, it will be greatly appreciated. The following code is configuration of SIR1 and SIR2. /* Enable the UART and IrDA. GPIOA has already been initialised. */ SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); SysCtlPeripheralEnable(SYSCTL_PERIPH_UART1); SysCtlPeripheralEnable(SYSCTL_PERIPH_UART2);
/* Set GPIO A0 and A1 as peripheral function. They are used to output the UART signals. D2/D3 and G0/G1 for IrDA */ GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_2 | GPIO_PIN_3); GPIOPinTypeUART(GPIO_PORTG_BASE, GPIO_PIN_0 | GPIO_PIN_1); /* Configure the UART to 115200 for 8-N-1 operation. */ UARTConfigSet( UART0_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE ); UARTConfigSet( UART1_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE ); UARTConfigSet( UART2_BASE, mainBAUD_RATE, UART_CONFIG_WLEN_8 | UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_ONE ); /* We dont want to use the fifo. */ HWREG( UART0_BASE + UART_O_LCR_H ) &= ~mainFIFO_SET; /* Enable the SIR1 and SIR2 */ UARTEnableSIR(UART1_BASE, (tBoolean) false); UARTEnableSIR(UART2_BASE, (tBoolean) false);
/* Enable both Rx and Tx interrupts. */ HWREG( UART0_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX ); IntEnable( INT_UART0 ); /* Enable IrDA1 and IrDA2 interrupt */ HWREG( UART1_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX ); IntEnable( INT_UART1 ); HWREG( UART2_BASE + UART_O_IM ) |= ( /*UART_INT_TX |*/ UART_INT_RX ); IntEnable( INT_UART2 );
thanks, Byang
RE: How to implement the Serial IrDA on LM3S6965 Posted by Dave on October 30, 2008 Try the Luminary Micro driver library, or the Luminary Micro support desk. Please keep to FreeRTOS questions here.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|