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

Stuck in ISR, data abort problem ?

Posted by Martin on January 2, 2007
Hi all,

I am using the yagarto toolchain, with gnuarm 4.1.1 and eclipse.

i am currently working on a CAN driver for the sam7x.

I have a test setup with two dev. boards, where one of the boards sends
a data frame to the other every 100ms. And when the dev. baord receives this
data frame it responds with an other data frame.

When two dev. boards are connected to each other the communication works
fine and the rtos is running nicely. However if i disconnect the CAN link for
some time (e.g 15 seconds) and reconnect. The application gets stuck in the CAN ISR.
And the CAN task is never run again.

If i halt execution randomly after the communication failure, i can see the line __dabt gets
executed.

if i have a breakpoint in the CAN ISR at this point, it will be continually hit. But there is no source
for the interrupt.

if i step through the last lines of the interrupt which are:

0x0010054c <vCANISR+600>: sub sp, r11, #28; 0x1c
0x00100550 <vCANISR+604>: ldmia sp, {r0, r1, r2, r3, r11, sp, lr}
0x00100554 <vCANISR+608>: ldmia sp!, {r12}
0x00100558 <vCANISR+612>: subs pc, lr, #4; 0x4
0x0010055c <vCANISR+616>: eoreq r0, r0, r12, lsr r8
0x00100560 <vCANISR+620>: eoreq r0, r0, r8, lsr r8
0x00100564 <vCANISR+624>: eoreq r0, r0, r1, lsr r8
0x00100568 <vCANISR+628>: eoreq r0, r0, r0, lsr r8
0x0010056c <vCANISR+632>: eoreq r0, r0, r4, lsr r8

i get the following error when executing line 0x00100550:

Thread [0] (Suspended: Signal 'SIGINT' received. Description: Interrupt.) <Stack is not available: Cannot access memory at address 0x1111110d.>

i have tried with different stack sizes from 200 to 1024. which didn't solve the problem.

the weird thing though, is that if i step through the code, after reconnecting the CAN link (in which case i will get a transmit interrupt) the application is behaving as expected and returning nicely after completing the ISR.

any help with this is greatly appreciated. thx

RE: Stuck in ISR, data abort problem ?

Posted by Martin on January 2, 2007
Hi again,

I have got to work with a rather crude workaround.

It seems that allthough

ulIntStatus = AT91C_BASE_CAN->CAN_SR;
ulIntMask= AT91C_BASE_CAN->CAN_IMR;
ulIntStatus &= ulIntMask;

results in ulIntStatus = 0. The CAN ISR would still fire.

the workaround i made was to disable the CAN Controller if ulIntStatus = 0.
And then from my CAN task, from where i also send out data frames, check
CAN_MR to see if it is disabled. And if it is, i reenable the CAN Controller.

If anyone has some experience using the CAN controller with freertos or otherwise,
i would be glad to some of the insights or solutions you might have to this problem.

regards,
Martin


[ 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