Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Please follow steps to flash ATmega with current CPM ATmega Firmware.

Info

Steps require Main Vehicle PCB to be connected to vehicle to provide power

...

  • Christoph Frauzem

1. Atmel Studio 7.0

  1. Start Atmel Studio 7.0

...

  1. Load current vehicle firmware solution "vehicle_atmega2560_firmware.atsln"

2. ICE Programmer

Warning

Make sure vehicle is powered off before connecting the programmer!

  1. Check pinout of Programmer, Vehicle and Connector Cable:

    Image AddedImage Added


  2. With vehicle power OFF, connect ICE programmer AVR Port to JTAG header.

...

Image Removed

Pinout:

Image RemovedImage Removed

...

  1. Connect ICE programmer with USB cable to PC.

    Image Added

3. Fuses

  1. Turn ON vehicle

...

  1. Connect to ATmega Chip

...

Warning

Check Fuses

...

  1. with Tools→Device Programming
    1. Click Apply
    2. Click Read
  2. Set the correct fuses (see table and screenshot below)
  3. Click Program
FuseCorrect Setting
HIGH.SPIENUnchecked
HIGH.EESAVEOptional i.e. checked or unchecked
LOW.CKDIV8

Unchecked

LOW.SUT_CKSELExt. Crystal Osc. 8.0- MHz; Start-up time: 16 CK + 65ms

Image Added

Info

If vehicle is behaving irregularly i.e. servo steering is acting erratic, LEDs timing appears off, this is most likely due to an issue with the clock.

  1. Check the above settings again. 
  2. Check external crystal oscillator on bottom side of board using oscilloscope (should be 16MHz)

4. Flash ATmega

  1. Flash chip using Start without Debugging

...


  1. Image Added

  2. Turn OFF vehicle

...

  1. Disconnect programmer

5. Tests

By setting a jumper, a test mode is activated. This allows testing the inputs and outputs without the MLC.

Multimedia
namellc_test.mp4