Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

ATMEGA-128 UART issue

Posted by Angel Gavrailov on February 21, 2006
Hi!

I am trying to use both UARTS in ATMEGA128 port of the kernel (compiled with GCC). I have the following situation: in one task, I send a message through UART0 to one node and I use xQueueReceive with timeout to receive an answer from the node. While this task is blocked on the queue, another task is sending a message to another node through UART1. The reception on both UARTS is done in an ISR. The problem is, that in this configuration the ISR is not always being entered. I have checked this using the following method: on evey entrance/exit of the ISR, I am toggling a pin of the MCU, thus counting the received symbols. With one channel of the scope I am tracing the received data (at the RX pin of the MCU) and with another channel I am tracing the toggling of the above mentioned pin. I found, that not on evey byte I get an interupt. Also, when I disable one of the tasks, transmitting through the USART, the picture is just fine. I have 4 additional tasks, so the problem is not in the count of tasks. Do you have any idea where this problem comes from? Thank you!

P.S.
I have tried this without the kernel (sending through UART0 in the main() and receiving through UART1 in an ISR). There was no such problem.

RE: ATMEGA-128 UART issue

Posted by Nobody/Anonymous on February 21, 2006
How are you sending to UART1? Is this also using a Q? A Q sounds good for the receive as it can be used to wake the task. For Tx maybe the overhead is too much and as you don't need to automatically wake a task a simply buffer could be used instead?

RE: ATMEGA-128 UART issue

Posted by Angel Gavrailov on February 22, 2006
I am sending to UART1 in a task, whcich is woken periodicaly (at about 100ms). The transmitting and the receiving in none of the UARTS occurs at the same time.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists