Quality RTOS & Embedded Software

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


Loading

posix simulator

Posted by alpha86 on March 25, 2011
Hi will appreciate if you guys could enlighten me on some doubts:

1) the windows and posix simulator runs expected on my computer (win7/linux) but when i run on debian (arm9) the freeRTOS does run but timing is weird. a delay of (500/ portTICK_RATE_MS) will only be waken again after 2-3 sec instead of 500 milisec. any suggestion which part of the code/configuration to look out for? the settings are all default as the freertos posix demo. fyi, i'm cross compiling for the gnu arm.

2) I have used the AsyncIO on the demo and it looks good. will like to know if it will be a good way to call read(2) from ISR(which is what the demo is doing) or wake a task from ISR where the task will do the read(2). I'm assuming reading lots of bytes.

3) related to q2, to do a posix write(2) to a uart device (baud 57600), is it okay to issue the write(2) command from a normal task? i'm assuming context switch will happen during a long write but the OS will takes care of it?

4) i'm thinking of modifying the AsyncIO UDP example to TCP. is there any consideration needed ?

thanks! any info will be of help.

RE: posix simulator

Posted by William Davy on April 4, 2011
Hi Alpha86,

Which Simulator are you using, I wrote the first one.

1. The tick is driven by ITIMER_REAL which is setup to generate a SIGALRM at the desired frequency. If the process doesn't get enough time, then it is feasible to miss ticks and so lose time. There are a couple of things that can be done to change that. If you look at the comments (if they are still there) at the top of prvSetupSignalsAndSchedulerPolicy() then there is a little bit of code related to pthread_setschedparam() that may help. Or you could renice -1 the process.

2. There shouldn't be a problem doing this though I would suggest that it is better to use the ISR to give a semaphore to a task which does it instead.

3. I believe so, just don't let it be re-entrant.

4. Should be straight-forward.

Sorry for the slow reply.


[ 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