Hallo zusammen,
ich versuche gerade das CAN-Beispiel für die NXP LPC11C-Serie zusammen
mit
Keil µVision auf einem Olimex LPC-P11C24 Board zum Laufen zu überreden.
Toolchain:
Olimex LPC-P11C24 Development Board
Keil µVision (Evaluation Mode)
Keil uLINK 2 Debugger
Peak System PCAN-USB mit PCAN-View
Folgende Schritte habe ich schon unternommen:
1. Steckbrücke Silent/Normal auf Normal gesteckt
2. Peak Systems PCAN korrekt angesteckt und den Viewer gestartet
3. Beispielcode kompiliert, geflasht und laufen lassen
Dann sollte eigentlich folgendes passieren:
1 | This sample project serves as a simple demonstration to use
|
2 | the built-in on-chip CAN and CANopen drivers available on
|
3 | the LPC11C00 NXP microcontroller series.
|
4 |
|
5 | Hardware Requirements:
|
6 | An external CAN Analyzer/Generator is needed to send and
|
7 | receive CAN frames to the LPC11C00.
|
8 |
|
9 | CAN Configuration:
|
10 | CAN bus baudrate: 125kbps
|
11 |
|
12 | Sample Project Details:
|
13 |
|
14 | 1. Upon reset, the LPC11C00 will send a simple CAN frame
|
15 | using the on-chip CAN drivers. It will send a CAN frame
|
16 | with its data contents of "TEST".
|
17 |
|
18 | 2. Whenever the LPC11C00 receives a CAN frame whose ID is
|
19 | between 0x400-0x4FF, it will simply resend the received
|
20 | frame back onto the CAN bus.
|
21 |
|
22 | 3. The LPC11C00 is now also responsive to Expedited SDO
|
23 | transfers. By default, the CANopen ID is 20 (0x14).
|
24 |
|
25 | 4. While the LPC11C00 isn't sending or receiving CAN frames
|
26 | it will go into SLEEP. It resumes automatically into
|
27 | active mode once it has received a CAN frame.
|
28 |
|
29 | 5. CAUTION! CAUTION! CAUTION! CAUTION! CAUTION! CAUTION!
|
30 | =====================================================
|
31 | Make sure to reserve memory from 0x1000 0050 - 0x1000 00B8
|
32 | for the on_chip CAN drivers!
|
33 | See the project's Target Options and the LPC11C1x Usermanual
|
34 | for details.
|
35 | =====================================================
|
36 | CAUTION! CAUTION! CAUTION! CAUTION! CAUTION! CAUTION!
|
Leider sendet der Chip weder die versprochene Nachricht mit "Test", noch
gibt er das angepriesene Echo aus. Ich vermute, dass das ganze mit
unreserviertem Speicher (Punkt 5.) zu tun hat. Leider habe ich keine
Ahnung, wie ich dem Linker das beibringen soll. Habe schon in der Hilfe
von Keil gesucht aber nichts gefunden. In einem anderen Forum habe ich
das so verstanden, dass eigentlich die folgende Zeile den Speicher
reservieren soll. Da hab ich aber wohl was falsch verstanden oder?
1 | ROM **rom = (ROM **)0x1fff1ff8;
|
Anbei noch das Projekt. Danke für eure Hilfe!
Gruß,
Daniel