FlexSeries

CAN Flasher

  • Connect flashing wire harness
  • Install flashing software
  • Flash compiled code

Prerequisites (Windows)

  • Ensure you have a PCAN-USB device, and that the device drivers are installed.
  • Ensure you have bootloader software loaded on your hardware. Please contact us if you are unsure of your bootloader status.

Limitations

The CAN Flasher Rev 1.1.0 has the following limitations. Future revisions are planned to add features which remove these limitations.

  • For FlexCase S, the baud rate of the CAN bus which is used for flashing the bootloader is static. You will have to use the Pro version of the FlexCase hardware or a dedicated flasher to change the bootloader CAN bus baud rate.
  • For FlexCase S 144/142 versions, CAN0 Message Buffer 0 cannot be used for user functions (reserved for bootloader request message). Other message buffers on CAN0 and CAN1 are fully available for user functions.
  • For the FlexCase E/R/G, the flash must be started within a small time window of powering on the controller (details below).
  • There is limited error checking implemented on the flasher. You will need to verify which version of MCU you have in order to flash the correct version. Attempting to flash the incorrect version will render the hardware inoperable until the bootloader is restored. See our guide on determining your MCU version here.

Assemble Hardware

Connect CAN0 on your FlexSeries hardware to the PCAN-USB device, and connect the PCAN-USB device to your computers USB port. Partial or full termination resistance is usually required for the devices to communicate.

Upon powering up, a low 0.5 second beep from the diagnostic buzzer indicates that the FlexSeries hardware has entered bootloader mode and is ready for flashing over CAN. The bootloader will also send a message over CAN every 5 seconds that indicates the hardware variant. The FlexCaseFlash program will also attempt to enter bootloader mode before flashing.

Install FlexCaseFlash

Download the FlexCaseFlash archive from our software page

Extract the archive, and run FlexCaseFlash.exe to install the flasher. Use the default settings in the installer. If the program does not run automatically after installation, desktop/start icons will also be created.

Flash a Pre-compiled File

  • Click Open Project and select the folder C:/Program Files/FlexCaseFlash/resources/flashconfigs and then select the subfolder corresponding to your hardware.

WARNING: Selecting the incorrect hardware or modifying the project file will render the hardware inoperable until the bootloader is restored.

  • Open the Flash Schedule on the right side of the project information screen.

  • Click the red Connect settings button at the top-right of the screen. Click Connect and Add, without modifying the default options. The settings button should now be green.

  • Ensure that the binary files match your hardware. Invalid file paths display in red text, valid paths in black text. The first binary is temporarily loaded to the controller to verify the application. The second binary is the application software to be flashed over CAN.

Choose the tab corresponding to your hardware:

Simulink Setup for Flashable Binaries

Modifications to your application software are required to function with the CAN bootloader. This section will cover modifications to Simulink models. Keep in mind that these modifications are not compatible with the regular flashing method, so only one can be used at once.

  • Ensure that the following MathWorks products are installed: MATLAB, Simulink, MATLAB Coder, Simulink Coder, Embedded Code
  • Follow the instructions corresponding with your hardware:

Simulink Build and Flash

  • From the extracted archive, open the .slx sample model corresponding to your hardware variant.
  • If your hardware is FlexCase S (142 or 144), verify the blocks required for bootloader interaction are present:
    • Hardware Modules Config > Init Processor (Target matches model, SRAM at highest setting)
    • Hardware Modules Config > Init_CAN0_500kbit (PTB1/0, 500Kbps)
    • Hardware Modules Config > WDOG_Config
    • Default Control Functions > System Enable/Update
    • Run Once at Startup > Action > Enable CAN0 bus (PTC10 low)
  • Build the model and ensure that the generated build includes a .bin file

  • In FlexCaseFlash, click the orange Edit button next to the application binary, click Choose File to select the binary you just built, click Change Group to apply changes. Leave the Flash driver file path as is.

  • Flash the new binary. The resulting behavior should be identical to the previous flash

Modifying Application Software

WARNING: Extra care must be taken when making changes to applications that will be flashed through FlexCaseFlash. If the hardware is rendered inoperable due to incorrect settings and you do not have a means of restoring the bootloader, your hardware will have to be shipped to Audesse for repairs at your expense.

  • Modify the Pulse Generator Block in the sample model to a different period or pulse width, rebuild and flash to verify that changes are reflected.

Use the following guidelines when developing application software for FlexCaseFlash:

Restoring Bootloader

In the event that the FlexCase becomes unresponsive to new flash attempts, the bootloader may have to be recovered to continue use. First, double check the Limitations section at the beginning of this tutorial with reference to your application software to ensure you have not programmed interfaces required for bootloader function.

Restoring the bootloader requires either a pro version or a seperate JTAG flashing tool. The bootloader can be flashed the same way described in the quick start guide. Only certain versions of bootloader will be available in the software downloads. Please contact us for more details.