Example: CAN NXP firmware update

This example flashes a binary file to the NXP microcontroller on the ZSOM-Control. This is needed once before the other CAN examples can be used, see CAN.

Project: ZSOM-Control_CAN.lvproj. In LabVIEW, open Help → Find Examples and search for “ZSOM”.

The ZSOM-Control features an additional microcontroller. It can communicate with the FPGA through dedicated pins (this can be implemented as SPI interface) and via CAN bus with the ZSOM (RT part) or other CAN nodes connected externally. The example project contains an executable for the microcontroller (ZSOM-Control-NXP.bin in <Project Folder>/SYNC/nxp). The source code is available on GitHub.

  1. Transfer the file from the PC to the ZSOM with zsom.pc.nxp.sync.vi in the section My Computer of the project. Make sure that secure SSH is enabled with NI MAX, set the connection info (target IP, user, password) and run the VI. It copies the content of the project folder SYNC/nxp to the folder /home/lvuser/nxp on the target.
  2. Load the file into the flash memory of the microcontroller with CAN_NXP_Firmwareupdate_RT_main.vi (RT). Select the bin file and press ERASE IT and FLASH IT.

Host code (My Computer): front panel of zsom.pc.nxp.sync.vi
Host code (My Computer): front panel of zsom.pc.nxp.sync.vi

RT code: front panel
RT code: front panel

The VI uses two lines of the FPGA (NXP ISP and NXP RESET) to set the microcontroller into in-circuit programming mode. The erasing and flashing is done with the ZCAN CANopen VIs, see Example: CANopen. At the end the microcontroller is reset again. The text field Verbose shows the progress.

RT code: block diagram
RT code: block diagram

  • Last modified: 4 weeks ago