CAN ISP implementation

Document created by jeremyzhou Employee on Aug 20, 2017Last modified by jeremyzhou Employee on Feb 8, 2018
Version 2Show Document
  • View in full screen mode

        The all LPC MCU contain In-System Programming which is able to programming or reprogramming the on-chip memory by using the bootloader software (Flash Magic) with the UART, CAN, USB, SPI, or other peripherals etc. The UART is available in all LPC MCU, whereas other peripheral interfaces may be only supported in particular sort of MCU. The article introduces the CAN ISP implementation for the NXP’s LPC microcontroller family.


       Taking the LPC11Cxx as an example, The C_CAN bootloader is activated by the ROM reset handler automatically if meets CAN ISP option. The C_CAN bootloader initializes the on-chip oscillator and the CAN controller for a CAN bit rate of 100 kbit/s and sets its own CANopen Node ID to a fixed value. The bootloader then waits for CANopen SDO commands and responds to them. These commands allow to read and write anything in a so-called Object Dictionary (OD). The OD contains entries that are addressed via a 16-bit index and 8-bit subindex. The command interface is part of this OD. In a word, these C_CAN ISP command handler allows to perform all functions that are otherwise available via the UART ISP commands, and the Table 1 summarizes the commanders.

Table 1

 CAN ISP SDO communication

        The CAN ISP node listens for CAN 2.0A (11-bit) messages with the identifier of 0x600 plus the Node ID 0x7D equaling to 0x67D. The node sends SDO responses with the identifier 0x580 plus Node ID equaling to 0x5FD. The SDO communication protocols“expedited”and “segmented” are supported. This means that communication is always confirmed: Each request CAN message will be followed by a response message from the ISP node. However, the SDO block transfer mode is not supported.

Fig1 CAN ISP object directory

   CAN ISP Implementation 

  •          Hrdware preparation
  •          LPCXpresso board LPC11C24 : OM13093

Fig 2 OM13093

  •          PCAN-USB

    Fig 3 PCAN-USB

  •          Hardware assembling

  •         Software preparation

         Starting the Flash Magic, then follow the below figures to programing and executing the application demo.

Fig 5

  •           Result
  •        Hex file: periph_blinky.hex (Froming the LPCopen library)

Fig 6 Led is blinking

1 person found this helpful