Quality RTOS & Embedded Software

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


Loading

Error Code in Sample Program

Posted by rog57 on December 21, 2012
Hi,

I've taken the "webserver" demo for IAR, modified it by removing everything for the USB and webserver, then added a bunch of my code in to IAR for peripheral access to the ADC, I2C, GPIO, etc. It compiles well and I've already created a couple of basic tasks including one that makes a call to the I2C temperature sensor on the board.
When putting data to the DBG port, a error message is being generated. This message is in the function "vApplicationTickHook" . The message is this: "An error has been detected in the Block Time test demo.", and comes up nearly every call after the task that does the I2C temperature read.

What's the cause, and how can it be taken care of?

Thanks,
Gary







RE: Error Code in Sample Program

Posted by Richard on December 21, 2012
Some of the standard demo tasks contains self checking code. The block time tasks test that the tasks are blocking, or more accurately, unblocking at the expected times. The test includes a little margin of error to allow for the fact that other tasks are running too, but still rely on the block time tasks being one of the highest priority tasks in the system. I guess that your debug output message is taking so long to execute that the block time task is not running within the time frame its own self checking expects.

How are the debug message being output? Some of the console out semi-hosting type mechanisms actually stall the processor while the output is being sent and that will make the code think it is outside of its allowed self checked timing bands. Other use things like virtual com ports which have excessively long interrupt functions, or excessively long critical section that will also disrupt the execution pattern.

You can ignore the warning, it is not an error as such, but does show that something in your code is taking a lot of time from high priority tasks.

Regards.

RE: Error Code in Sample Program

Posted by rog57 on December 21, 2012
Thanks for the prompt reply.
I am using the standard CMSIS "debug_frmwrk.c" _DBG_ calls, which output directly out UART0 using PUTC. It's set up at 115K. I have had no issues putting data out the debug port in extremely fast loops without missing data, so I would be surprised if this was the problem

I have one task reading temperature (I2C) and displaying every 4000ms; the other task reading voltage (ADC) and displaying every 7000ms.

The third task is the LED flash tasking, running every 500ms

The variable "mainCHECK_DELAY" is presently at 10000ms. All tasks are set to "mainFLASH_TASK_PRIORITY".

Since these are the only 3 tasks running, which one do you suspect is hogging too much time?

Gary


RE: Error Code in Sample Program

Posted by Richard on December 21, 2012
...assuming non of the drivers a disabling interrupts for long periods, is the block time test task the highest priority task in the system?

You can just take the task out, it is only for demo purposes.

Regards.

RE: Error Code in Sample Program

Posted by rog57 on December 21, 2012
OK, I was not aware of that, but probably would be if I were further ahead in the book! I'm just jumping a bit ahead of myself, but pretty enthused by what I've been able to do so far!

I'm sure I will have more questions as I advance forward. Thank you for the answers!

Gary


[ 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