LPC11C14 CAN-Example ?

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

LPC11C14 CAN-Example ?

4,154 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Sep 28 22:45:06 MST 2010
Just working with my first LPC11C14 board and looking for a simple CAN example (Init / RX / TX) with ROM functions. Found a Keil sample, but I'm not sure if it's working without Keil Compiler.
Can anyone confirm that LPCXpresso is working with LPC11C14 and give me a hint where to start?

Thanks,
Zero
0 Kudos
Reply
23 Replies

3,515 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Nov 18 19:20:40 MST 2010
Cable:

http://knowledgebase.nxp.com/showthread.php?p=1210
0 Kudos
Reply

3,515 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DaveNadler on Thu Nov 18 15:47:16 MST 2010
OK, next dumb question:

LPC link board has a 10-pin (tiny, not .1") header
like a JTAG connector. The IAR LPC11C14
schematic shows a 10-pin header.

Anybody know if:
These are the same size and pinout ?
If so, where one can obtain the cable ?

Thanks in advance,
Best Regards, Dave

PS: I know, I can also solder something up...
0 Kudos
Reply

3,515 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Nov 14 13:14:42 MST 2010
Fortunately just 4 wires, so we don't have to study rocket science...:)
0 Kudos
Reply

3,515 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DaveNadler on Sun Nov 14 13:03:03 MST 2010
Thanks ! Even I can manage that !
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Nov 14 11:33:29 MST 2010
Just connect SWCLK, SWDIO, RESET & GND from LPC-Link (J4) :).
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DaveNadler on Sun Nov 14 11:21:56 MST 2010

Quote: NXP_USA
Although there is no LPC11C1x LPCXpresso board today, LPCXpresso has been tested with the LPC11C1x products and the LPC-Link debugger works well with other vendors' boards.



Can you provide instructions for using the LPClink
with the "IAR KickStart Kit for LPC11C14" board ?
Hopefully this is pretty straight-forward ?

Thanks in advance,
Best Regards, Dave
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Oct 06 19:04:17 MST 2010
Thanks for the reply.Obviously these projects base an the same source I've used (Sample Code Bundle for LPC11Cxx Peripherals using Keil's MDK-ARM):

http://ics.nxp.com/support/documents/microcontrollers/?scope=LPC11C14&sort=date

Note: There's a little typo in canopen_onchip project, so it's not compiling:

Properties -> C/C++ Build -> Tool Settings -> Settings -> MCU C Compiler -> Directories -> Include paths

Quote:
D:/projects/lpcxpresso/samples/lpc11xx/canopen_onchip/cmsis
D:/projects/lpcxpresso/samples/lpc11xx/canopen_onchip/config
D:/projects/lpcxpresso/samples/lpc11xx/canopen_onchip/driver


of course should be relative:

Quote:
../cmsis
../config
../driver



I've also noticed that CAN On-Chip RAM address 0x1000 0050 to 0x1000 008B isn't excluded (still not sure if that could cause problems).


Quote:
Although there is no LPC11C1x LPCXpresso board today...



Does that mean there will be something like that ... tomorrow?
If so, is it to late to add a wish-list?

Thanks,
Zero
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Wed Oct 06 08:32:46 MST 2010

Quote: Zero
Just working with my first LPC11C14 board and looking for a simple CAN example (Init / RX / TX) with ROM functions. Found a Keil sample, but I'm not sure if it's working without Keil Compiler.
Can anyone confirm that LPCXpresso is working with LPC11C14 and give me a hint where to start?

Thanks,
Zero



Although there is no LPC11C1x LPCXpresso board today, LPCXpresso has been tested with the LPC11C1x products and the LPC-Link debugger works well with other vendors' boards.

I have attached three CAN samples- a very basic one using the CAN peripheral directly, a version using the LPC11C1x on-chip CAN drivers, and an openCAN sample using the on-chip openCAN drivers.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Oct 05 22:59:28 MST 2010
Now back to the initial question:

This sample uses LPC11Cxx on-Chip drivers to transmit & echo CAN messages.

Just add a CAN-transceiver & LED and this sample should work.
I've tested it with 11-bit CAN messages from 83 kbit/s to 1000 kbit/s.

[ATTACH]206[/ATTACH]


Note: This sample does not exclude CAN On-Chip RAM address 0x1000 0050 to 0x1000 008B to avoid disabling "Managed Linker Script".
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Oct 05 03:18:18 MST 2010
Sorry to say: You're wrong :). My board is working.
And even more sorry to say: I'm wrong, too :mad:.

The winner is:

http://www.flickr.com/photos/58892165@N08/5406195518/

RESET :eek:!!!

As mentioned before my SWD-connector just uses SWCLK, SWDIO and GND. That's not enough for LPC11C14 (and so I think it's the same for all LPC11xx) .
It's necessary to connect Reset (LPCXpresso J4/11) :o. After downloading this 1/4 second reset is important to start debugging.
I've thought a simple 3-wire SWD connection is enough (and it was enough for LPC1343 & LPC1768), but for LPC11C14 a SWD-Reset is indispensable.

Thanks for your help,
Zero
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Oct 05 00:34:54 MST 2010
Thanks for your support, so it's time to throw this board away and redraw / make a new board tomorrow and report the result.

Thanks,
Zero
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 04 23:55:19 MST 2010
I have built and downloaded your application to the LPC11C14 board we have here (an IAR board). The application downloads and breaks on main() as expected. I can run/break/single step and view memory/peripherals/registers etc etc. i.e. the debugger works and is fully functional when connected to an LPC11C14.

NXP have also confirmed to us that they have had no problems when debugging an LPC11Cxx part.

Therefore, I can only conclude that you have a problem with your custom board.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 04 09:32:00 MST 2010
Yes, it's a custom board. I've copied nearly everything from one of my 3 different LPC1343 boards (all working).
Of course I've checked everthing obvious like pullups, supply voltage, reset pin, crystal and ISP pin.
Since there are no other problems except debugging I'm quite sure that it's no hardware problem.
My debug connection is done via simple GND / SWDIO /SWCLK connection (also working with several 1768 / 1343 boards).
Didn't change debug configuration from imported sample (attached project).
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 04 07:33:53 MST 2010
We haven't heard of any other reports of debugging problem with an LPC11Cxx.

Do you have a custom board? Is the debug correctly configured?
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 04 07:20:11 MST 2010
No, whatever I tried, debugging isn't working for LPC11C14 although downloading and running after power cycle is working even with managed linker script.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 04 07:03:48 MST 2010
Can you confirm that it works if you DON'T change the Ram definition.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 04 06:46:30 MST 2010
Just made a test with LPC1343 and

RamLoc8 (rwx) : ORIGIN = 0x10000100, LENGTH = 0x1F00 /* 8k */


No problems at all. So I think it's a LPC11Cxx ISR Debugger problem.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 04 06:23:19 MST 2010
That's my problem, breakpoints don't break. Even if I change to:

Stop on startup at: ResetISR,

no break.
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Oct 04 06:01:58 MST 2010
Hi

Can you set the initial breakpoint to stop at ResetISR and then single step from there, to see where it is going wrong?
0 Kudos
Reply

3,516 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Oct 04 05:34:25 MST 2010
Good idea, tested this earlier:

RamLoc8 (rwx) : ORIGIN = 0x10000100, LENGTH = 0x1F00 /* 8k */


Same result.
0 Kudos
Reply