|
|
View previous topic :: View next topic |
Author |
Message |
icesynth
Joined: 03 Sep 2007 Posts: 32 Location: Edmonton, Alberta
|
RESTART_TRAP_CONFLICT on PIC33FJ256GP710 |
Posted: Wed May 11, 2011 11:53 am |
|
|
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 _________________ Programming for the the real world.
--Chris Burchett
Sylver Technologies Inc. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed May 11, 2011 12:14 pm |
|
|
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
|
|
Posted: Wed May 11, 2011 3:18 pm |
|
|
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. |
|
|
|
|
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
|