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 332 of 547
NXP Semiconductors
UM10398
Chapter 17: LPC11Cxx C_CAN on-chip drivers
Remark: If the flag isr_handled was set TRUE when initializing CANopen, this callback
function will be called by the CAN API interrupt handler and therefore will execute on the
interrupt level.
17.4.17 CANopen fall-back SDO handler callback
The CANopen fall-back SDO handler callback function is called by the CANopen handler.
This function is called whenever an SDO request could not be processed or would end in
an SDO abort response. It is called with the full data buffer of the request and allows to
generate any type of SDO response. This can be used to implement custom SDO
handlers, for example to implement the SDO block transfer method.
// Return values for CANOPEN_sdo_req() callback
#define CAN_SDOREQ_NOTHANDLED 0 // process regularly, no impact
#define CAN_SDOREQ_HANDLED_SEND 1 // processed in callback, auto-send
// returned msg
#define CAN_SDOREQ_HANDLED_NOSEND 2 // processed in callback, don't send
// response
Example call (not implementing custom processing):
// CANopen callback for custom SDO request handler
uint8_t CANOPEN_sdo_req (
uint8_t length, uint8_t *req_ptr, uint8_t *length_resp, uint8_t *resp_ptr)
{
return CAN_SDOREQ_NOTHANDLED;
}
Remark: If the flag isr_handled was set TRUE when initializing CANopen, this callback
function will be called by the CAN API interrupt handler and therefore will execute on the
interrupt level.