Atmel Start bug in RTOS USART driver

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm implementing a serial protocol which includes a checksum for every message to detect errors in transmission. Testing things on the bench, I kept getting errors which should not happen in that environment. After days of investigation, I replaced the Atmel Start USART RTOS receive driver code with a simple polled circular buffer, and everything worked perfectly.

 

There is a bug in the driver code which causes received characters to be missed, very occasionally (about 1 in 5000 characters).

I think I can work around it, but it's wasted a lot of time.

Has anyone else noticed this? Is is worth reporting it... to who?

 

Details:

I'm developing on the SAMV71Q21RT using FreeRTOS

with

Microchip Studio 7 (Version: 7.0.2542)

Atmel Start v1.0.198.0

 

The bug is in function usart_os_read in hal_usart_os.c, line 295-296 - if a receive interrupt occurs "between" these two lines, a character can get lost.