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

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 ]    [ 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