Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 324 of 547
NXP Semiconductors
UM10398
Chapter 17: LPC11Cxx C_CAN on-chip drivers
msg_obj.mask = 0x0UL;
msg_obj.dlc = 1;
msg_obj.data[0] = 0x00;
(*rom)->pCAND->can_transmit(&msg_obj);
17.4.7 CANopen configuration
The CAN API supports an Object Dictionary interface and the SDO protocol. In order to
activate it, the CANopen configuration function has to be called with a pointer to a
structure with the CANopen Node ID (1...127), the message object numbers to use for
receive and transmit SDOs, a flag to decide whether the CANopen SDO handling should
happen in the interrupt serving function automatically or via the dedicated API function,
and two pointers to Object Dictionary configuration tables and their sizes. One table
contains all read-only, constant entries of four bytes or less. The second table contains all
variable and writable entries as well as SDO segmented entries.
typedef struct _CAN_ODCONSTENTRY {
uint16_t index;
uint8_t subindex;
uint8_t len;
uint32_t val;
} CAN_ODCONSTENTRY;
// upper-nibble values for CAN_ODENTRY.entrytype_len
#define OD_NONE 0x00 // Object Dictionary entry doesn't exist
#define OD_EXP_RO 0x10 // Object Dictionary entry expedited, read-only
#define OD_EXP_WO 0x20 // Object Dictionary entry expedited, write-only
#define OD_EXP_RW 0x30 // Object Dictionary entry expedited, read-write
#define OD_SEG_RO 0x40 // Object Dictionary entry segmented, read-only
#define OD_SEG_WO 0x50 // Object Dictionary entry segmented, write-only
#define OD_SEG_RW 0x60 // Object Dictionary entry segmented, read-write
typedef struct _CAN_ODENTRY {
uint16_t index;
uint8_t subindex;
uint8_t entrytype_len;
unint8_t isr_handled;
uint8_t *val;
} CAN_ODENTRY;
typedef struct _CAN_CANOPENCFG {
uint8_t node_id;
uint8_t msgobj_rx;
uint8_t msgobj_tx;
uint8_t isr_handled;
uint32_t od_const_num;
CAN_ODCONSTENTRY *od_const_table;
uint32_t od_num;
CAN_ODENTRY *od_table;
} CAN_CANOPENCFG;