Tracing Interrupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tracing Interrupts

474 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdeas on Tue Jul 22 11:37:17 MST 2014
Brand new to IDE, On the LPC11C24 chip I am trying to combine both the UART and CAN example programs by simply sending all CAN messages up the UART.
After re-arranging a few variables I was able to get the basic function but after just 3 or 4 exchanges the debugger crashes into a un-handled interrupt. I have tried both a Segger jtag unit and the NXP-link but can not figure out how to trace back where this problem interrupt is coming from.

Is there any tracing abilities with the IDE or does one have to purchase the Red stuff?
0 Kudos
6 Replies

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdeas on Wed Jul 23 08:13:33 MST 2014
The C_CAN driver was overwriting my ring buffers.
Found the reference in UM10398 Ch 17.4 and added the appropriate reservation

Thanks for pointing me in the right direction.
0 Kudos

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Jul 22 16:03:02 MST 2014
I'm not too familiar with all this examples...

A lot of them are let's say 'problematic'...

Using CAN with LPC11Cxx since years (and LPC15xx since March) I'm using own libraries...

But anyway, all examples should reserve RAM as explained in UM and several times in good old LPCXpresso Forum:

http://www.lpcware.com/content/forum/how-to-reserve-lpc11cxx-ram

0 Kudos

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdeas on Tue Jul 22 15:37:39 MST 2014
Interesting. I don't have the CANopen ROM API, just the provided CCAN_API header file and example.
If the ROM is using 'random' memory blocks then I'm surprised I got this far. I would assume that I need to both reserve AND reference the location for the ROM driver.
Considering the LPCXpresso example does not show the need for RAM outside msgblks and the subcall return block, where can I get the actual API showing a proper CCAN init?
0 Kudos

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Jul 22 14:50:41 MST 2014
Did you reserve On-chip RAM somewhere?

If not, just add :

#include "cr_section_macros.h"
__BSS(RESERVED) char CAN_driver_memory[184]; /* reserve 184 bytes for CAN driver */


If CAN API is using 'used' RAM you'll see a lot of funny effects 
0 Kudos

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdeas on Tue Jul 22 11:59:51 MST 2014
Looking into that now. Here is the code
0 Kudos

458 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Jul 22 11:52:29 MST 2014
Start here:

http://www.lpcware.com/content/faq/lpcxpresso/debugging-hard-fault

I'm not sure which example we are talking about in detail and how you've generated the new project, so exporting and posting your project could also be a good idea...

But anyway, this link above should give you a hint if you have a CAN or UART problem  :)
0 Kudos