USART RX data to TX [solved]

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

BryanChang
Posts: 11
Joined: Fri Dec 01, 2006 4:30 am

USART RX data to TX [solved]

Sat Aug 29, 2009 5:11 am

Dears.

I am writing a sample code for USART RX data to TX, Have anybody know how to do? I based on software package - basic-usart-hw-handshaking-project-at91sam3u-ek to modify main.c as below.

// Configure pins
PIO_Configure(pins, PIO_LISTSIZE(pins));

// Configure USART and display startup trace
ConfigureUsart();
printf("-- Basic USART Hardware Handshaking Project %s --\n\r", SOFTPACK_VERSION);
printf("-- %s\n\r", BOARD_NAME);
printf("-- Compiled: %s %s --\n\r", __DATE__, __TIME__);

// Configure TC0 to generate a 1s tick
//ConfigureTc0();
// Start receiving data and start timer
USART_ReadBuffer(BOARD_USART1_BASE, pBuffer, BUFFER_SIZE);
BOARD_USART1_BASE->US_IER = AT91C_US_RXBUFF;
//TC_Start(AT91C_BASE_TC0);

// Infinite loop
while (1)
USART_PutChar(BOARD_USART1_BASE, USART_GetChar(BOARD_USART1_BASE));

Every second the GPS module TX will send almost 200 bytes and USART RX can be received, but USART TX cannot send to the same data...

Have any setting I lost?

Bryan Chang
BryanChang
Posts: 11
Joined: Fri Dec 01, 2006 4:30 am

Re: USART RX data to TX

Sat Sep 05, 2009 9:07 am

I found out this is RTS signal needs to pull high to request trasfer signal, so just do this and the function is worked normally.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 2 guests