Quality RTOS & Embedded Software

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


Loading

FreeRTOS trace macro implementation

Posted by dioghenes-0 on June 4, 2018

Good morning,

I'm trying to add some tracing features to my OS so I'm implementing the macro provided by the header FreeRTOS.h. Everything works but now I've tried to add a uart communication: for example, when a mutex is taken, a string is sent throug uart. Well, when I add such thing, the board crashes.

I'm usign FreeRTOS 9 and a STM32F3DISCO board.

I have done some debug and I have noticed that the system crashes on uxListRemove function, the WWDG_IRQHandler is raised and then the execution goes into a generic error handler that i've written, which is correct; I dont' understand why the WWDG interrupt is raised....

Thank you in advance for the help, Best regards


FreeRTOS trace macro implementation

Posted by dioghenes-0 on June 4, 2018

I have done some more attempts and I have noticed that if I remove the HALUARTTransmit() function everything works correctly...I didn't setup the WWDG so it's strange its irq is raised...


FreeRTOS trace macro implementation

Posted by richard_damon on June 4, 2018

One issue with sending out serial data in a trace is that the uart comm routine may hold up exection until the message is sent, slow things down greatly. If you have enabled the watchdog, you may now just be running to slow to keep up with kicking the dog enough. The other possible issue is that doing the communnication might make some actions recursive (if you send on taking a mutex, and the sending routine takes a mutex, you get stuck in an infinite loop). Generally you want the trace routines to do something very quick and self contained. Perhaps having an array where you store information on the last N traced operations (perhaps filtering out some that you know you don't care about). You can then look at the array with a debugger or have a task dump the data out seperately from the trace logging.


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


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

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

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

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

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Mediatek

Renesas

RISC-V

SiFIve RISC-V

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