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

Getting hardfault with a simple application on cortex m4

Posted by himanshup2 on March 21, 2017

I am using cortex m4 along with gcc. I have create 4 threads in freeRTOS, 3 of which are periodic with periods of 10ms, 100ms and 1000 ms. My application runs all 4 threads for 1 instance and then experiences a hardfault.

Here is a log report generated with respective register values

HARDFAULT:ERROR:START OF FULL LOG

HARDFAULT:ERROR:R0 R1 R2 R3 R12 : 0x0 0x20001950 0x10000 0x200020c8 0xa5a5a5a5 HARDFAULT:ERROR:LR PC PSR BFSR : 0x8 0x8 0x6000000b 0x200 HARDFAULT:ERROR:CFSR HFSR DFSR AFSR MMAR BFAR : 0x20000 0x40000000 0x0 0x0 0xe000ed34 0xe000ed38

HARDFAULT:ERROR:END OF FULL LOG

I have tried changing the stack size for threads but that hasnt helped in anyway. Here is a link to freeRTOS config file : https://drive.google.com/open?id=0B5lr6ikuuOsxWnBTNjgyNmRZeWc

And this is the main.c that I am using https://drive.google.com/open?id=0B5lr6ikuuOsxb01PbkZDNWkwcEE

Kindly help me out.


Getting hardfault with a simple application on cortex m4

Posted by rtel on March 21, 2017

What happens if you take out the calls to Task10ms(), Task100ms(), Task_1000ms()? Does the code continue to run then? You could replace the calls with simple incrementing variables to see if the tasks are still running.

If that does not help, what happens if you set configUSETICKLESSIDLE to 0?


[ 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