LPC1113FHN33/303,5 NXP Semiconductors, LPC1113FHN33/303,5 Datasheet - Page 321

no-image

LPC1113FHN33/303,5

Manufacturer Part Number
LPC1113FHN33/303,5
Description
ARM Microcontrollers - MCU Cortex-M0 24 kB flash up to 8kB SRAM
Manufacturer
NXP Semiconductors
Datasheet

Specifications of LPC1113FHN33/303,5

Rohs
yes
Core
ARM Cortex M0
Processor Series
LPC1113
Data Bus Width
32 bit
Maximum Clock Frequency
50 MHz
Program Memory Size
24 KB
Data Ram Size
4 KB
On-chip Adc
Yes
Operating Supply Voltage
1.8 V to 3.6 V
Operating Temperature Range
- 65 C to + 150 C
Package / Case
HVQFN-33
Mounting Style
SMD/SMT
Factory Pack Quantity
260
NXP Semiconductors
UM10398
User manual
17.4.15 CANopen SDO segmented read callback
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.
The CANopen SDO segmented read callback function is called by the CANopen handler.
The callback function allows the following actions:
// Values for CANOPEN_sdo_seg_read/write() callback 'openclose' parameter
#define CAN_SDOSEG_SEGMENT 0 // segment read/write
#define CAN_SDOSEG_OPEN 1 // channel is opened
#define CAN_SDOSEG_CLOSE 2 // channel is closed
Example call (reading a buffer):
uint8_t read_buffer[0x123];
// CANopen callback for segmented read accesses
uint32_t CANOPEN_sdo_seg_read(
{
uint16_t index, uint8_t subindex, uint8_t openclose,
uint8_t *length, uint8_t *data, uint8_t *last)
static uint16_t read_ofs;
uint16_t i;
if ((index == 0x2200) && (subindex==0))
{
if (openclose == CAN_SDOSEG_OPEN)
{
}
else if (openclose == CAN_SDOSEG_SEGMENT)
{
// Initialize the read buffer with "something"
for (i=0; i<sizeof(read_buffer); i++)
{
}
read_ofs = 0;
i = 7;
while (i && (read_ofs < sizeof(read_buffer)))
{
}
*length = 7-i;
if (read_ofs == sizeof(read_buffer)) // The whole buffer read:
inform about the opening of the read channel.
provide data segments of up to seven bytes to the reading host.
close the channel when all data has been read.
abort the transmission at any time.
read_buffer[i] = (i+5) + (i<<2);
*data++ = read_buffer[read_ofs++];
i--;
All information provided in this document is subject to legal disclaimers.
Rev. 12 — 24 September 2012
Chapter 17: LPC11Cxx C_CAN on-chip drivers
UM10398
© NXP B.V. 2012. All rights reserved.
321 of 538

Related parts for LPC1113FHN33/303,5