Problem with can_onchip

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

Problem with can_onchip

850 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jb_mrush on Thu Jun 28 09:47:40 MST 2012
Hello,
I'm using the exact program example "can_onchip" on a LPC11C24 and a PCAN USB (by Peak).
I'm trying to see Transmit and Received messages but when I debug my program, no problem is found but the "TEST' message is not send.

I've tested my CAN connection and it seems OK.
And the baud rate is the same on PCAN Explorer than in the program.

So I would know if there is something to include in the code in order to make the connection with PCAN USB.
Also, I didn't reserve memory (as indicate in the .txt) on the CAN driver cause I don't know how to do it.

Thank you for your help [SIZE=2]
[/SIZE]
0 Kudos
Reply
5 Replies

798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jb_mrush on Fri Jul 13 14:09:46 MST 2012
Thanks for the RAM program it's working great.
I've solved my problem, it was a pinning problem...my bad!
Thanks everyone
0 Kudos
Reply

798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Jul 01 03:39:02 MST 2012

Quote: madhuvariar
Check your linker descriptor file and confirm that first 256 bytes of RAM is reserved for CAN onchip drivers.
something similar to RAM start address will be 0x10000100 should be there instead of 0x1000000 , in side the linker descriptor file.
You can find the linker descriptor on the work space and also you can edit that if required.



As discussed several times in this forum, that's obsolete :eek:

See #5 of http://knowledgebase.nxp.com/showthread.php?t=3138

To reserve RAM with LPCXpresso 4 versions:
#include <cr_section_macros.h>
#include <NXP/crp.h>

//reserve ROM-RAM 0x1000 0050 - 0x1000 00B9
__BSS(RESERVED) char CAN_driver_memory[0xC0];
Also it's a good idea to increase 'Stack offset'
0 Kudos
Reply

798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by madhuvariar on Sun Jul 01 03:07:57 MST 2012
Check your linker descriptor file and confirm that first 256 bytes of RAM is reserved for CAN onchip drivers.
something similar to RAM start address will be 0x10000100 should be there instead of 0x1000000 , in side the linker descriptor file.
You can find the linker descriptor on the work space and also you can edit that if required.
0 Kudos
Reply

798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Sat Jun 30 14:12:11 MST 2012
Hello jb_mrush,

How did you test your CAN connection?

Did you check the other CAN examples?
0 Kudos
Reply

798 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Jun 28 10:01:26 MST 2012

Quote: jb_mrush
Also, I didn't reserve memory (as indicate in the .txt) on the CAN driver cause I don't know how to do it.



#1 Read #19 of http://knowledgebase.nxp.com/showthread.php?t=2687  ;)

#2 About 99% of all CAN problems are hardware problems, so it's a good idea to describe 0% of your hardware :rolleyes:
0 Kudos
Reply