CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

RESTART_TRAP_CONFLICT on PIC33FJ256GP710

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
icesynth



Joined: 03 Sep 2007
Posts: 32
Location: Edmonton, Alberta

View user's profile Send private message Visit poster's website

RESTART_TRAP_CONFLICT on PIC33FJ256GP710
PostPosted: Wed May 11, 2011 11:53 am     Reply with quote

I am using a PIC33FJ256GP710 device and when it is sent a character on the serial port (UART2) the device will reset during the reset cause as RESTART_TRAP_CONFLICT.

The UART is set up as a stream:
Code:
#use rs232(baud=57600, UART2, RESTART_WDT, stream=PC_UART, bits=8, parity=N, stop=1)


The pic can send serial data without any issues, and the restart will not happen when the UART interrupt is not enabled, and occurs no matter what code is in the interrupt routine.
The pic is running at 40 MHz, with the PLL set up as follows:

Code:
case 40:      // FVCO = 160 MHZ
PLLFBD    = 0x0026;         // M = 40 = (38 + 2)
CLKDIV    = 0x3000;         // N1 = 2, N2 = 2, Fosc = 40MHz


Timer 2 is interrupting at a rate of 1 kHz, and Timer 3 is used for PWM outputs on OC1.

Has anyone had this issue before? And if so any suggestions?

If anyone could help with this or be greatly appreciated,
Thank you in advance Smile
_________________
Programming for the the real world.
--Chris Burchett
Sylver Technologies Inc.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed May 11, 2011 12:14 pm     Reply with quote

To avoid jumping into conclusions, you should post a complete code example, that reproduces the problem and also tell your compiler version.

A trap conflict reset is quite common and usually caused by an unhandled trap interrupt, mostly stack or address error. As discussed in previous threads, you can get more information by implementing trap interrupt handlers.
icesynth



Joined: 03 Sep 2007
Posts: 32
Location: Edmonton, Alberta

View user's profile Send private message Visit poster's website

PostPosted: Wed May 11, 2011 3:18 pm     Reply with quote

Because of a compiler directive oversight, the #int_rda2 was never being called and the default interrupt handler was being called instead.

Compiler Version 4.120
_________________
Programming for the the real world.
--Chris Burchett
Sylver Technologies Inc.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group