Download AN11238 LPC11Cxx CANopen network demo

Transcript
AN11238
NXP Semiconductors
LPC11Cxx CANopen network demo
8. Contents
1.
1.1
1.2
1.3
2.
3.
3.1
3.2
3.3
4.
4.1
4.2
4.3
4.3.1
4.3.2
4.3.3
4.3.4
4.4
4.4.1
4.4.1.1
4.4.1.2
4.4.1.3
4.4.1.4
4.4.2
4.5
4.5.1
4.5.2
4.5.2.1
4.5.2.2
4.5.3
5.
5.1
5.2
5.2.1
5.2.2
5.3
5.4
6.
7.
7.1
7.2
7.3
8.
Introduction ......................................................... 3
CAN ................................................................... 3
CANopen............................................................ 3
LPC11Cxx .......................................................... 5
CANopen demo introduction.............................. 6
Running the demo ............................................... 8
Introduction ........................................................ 8
Using the RS232 serial connection .................... 8
Using the onboard buttons ............................... 12
CANopen in more detail .................................... 13
Object dictionary .............................................. 13
The COB-ID ..................................................... 14
The SDO protocol ............................................ 15
Expedited read ................................................. 17
Expedited write................................................. 18
Segmented read ............................................... 19
Segmented write .............................................. 21
The NMT protocol ............................................ 23
NMT states ....................................................... 23
Initializing ......................................................... 23
PreOperational ................................................. 23
Operational....................................................... 24
Stopped ............................................................ 24
NMT command................................................. 24
The heartbeat protocol ..................................... 24
The heartbeat frame ......................................... 25
Associated OD entries ..................................... 25
Index 1016 h (Heartbeat Consumer) ................ 25
Index 1017h (Heartbeat Producer) ................... 25
Heartbeat example ........................................... 25
Software ............................................................. 27
Software organization ...................................... 27
Application........................................................ 27
Master .............................................................. 27
Slave ................................................................ 29
CANopen driver................................................ 30
CANopen device definition ............................... 30
References ......................................................... 32
Legal information .............................................. 33
Definitions ........................................................ 33
Disclaimers....................................................... 33
Trademarks ...................................................... 33
Contents ............................................................. 34
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in the section 'Legal information'.
© NXP B.V. 2012.
All rights reserved.
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Date of release: 12 July 2012
Document identifier: AN11238