Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

freertos_usart_write_packet does not block!?

Posted by soloeng on November 29, 2016

Reposting new topic:

Has anyone actually tested the USART read to verify it blocks a task? I am using what appears to be the most current FreeRTOS v7.3.0 with ASF (is anything more current?), and a call to freertosusartwrite_packet definitely does not block my task.

I am properly configured with USETXACCESSSEM, USERXACCESSMUTEX, WAITTXCOMPLETE, and WAITRXCOMPLETE, and am using 10ms of ticks to block (i.e. 10/portTICKRATEMS). The status returned is success.

Using a simple GPIO that I set high before the write, and drop low immediately afterwards clearly shows the GPIO low well before the USART transfer completes.

I did review the PDF usually referenced. I see nothing to suggest I'm doing anything wrong here. I am doing this on an Arduino Due.

Any ideas/suggestions appreciated.

Thank you.


freertos_usart_write_packet does not block!?

Posted by rtel on November 29, 2016

At the time the drivers were written they were tested very well, but current version of FreeRTOS is 9.0.0, and in 9.0.0 you cannot use mutexes from an interrupt which I think the drivers do. In version 9.0.0 you can use direct to task notifications instead - which are more efficient.


freertos_usart_write_packet does not block!?

Posted by soloeng on December 7, 2016

Hello,

How exactly are you are using FreeRTOS 9.0.0 with Atmel Studio 7.0 ASF? I can only install FreeRTOS V7.3.0. Is there something I can do to update to the latest version for FreeRTOS within the Atmel Studio 7.0 ASF environment?

Frankly, I find the cachphony of open source to be nothing short of complete bewilderment!

Thanks.


freertos_usart_write_packet does not block!?

Posted by rtel on December 7, 2016

You should just be able to drop the latest source files over the top of the V7 files in your project.


freertos_usart_write_packet does not block!?

Posted by soloeng on December 7, 2016

Yes, for the basic FreeRTOS kernel files, but FreeRTOS ported code (such as the function freertosusartwrite_packet that I am asking about in this thread) was developed to abstract the PDC/interrupts from the user so they could use it to write/read and block until the operation completes. That source code is only version V7.3.0 as far as I know, and as I indicate in this thread, does not appear to work correctly.

I'm not sure if it is the FreeRTOS folks or the Atmel Studio 7 ASF folks that are responsible for this. I for one would love an update, or at least an answer to my question about why this functin isn't working as advertised. I'm just trying to figure this out so I don't have to keep digging deeper into code that was provided to make life easier. At some point, it's just easier to re-write the code, which I'm trying to avoid.

Thanks for your help/suggestions. Anything else you can provide, including pointers to the right direction/people, would be appreciated.


freertos_usart_write_packet does not block!?

Posted by rtel on December 7, 2016

...and in fact I'm not sure the that particular driver is compatible with the latest FreeRTOS version in any case. I think that was discussed a little earlier in this thread.


freertos_usart_write_packet does not block!?

Posted by soloeng on December 7, 2016

That's fine as I'm not using V9.0.0 (I actually never brought it up), I'm only using the V7.3.0 that is provided by the Atmel Studio 7. I'm finding that it does not work as advertised. That's what I'm asking about.


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


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner