Please follow steps to flash ATmega with current CPM ATmega Firmware.
- Current Firmware: https://github.com/embedded-software-laboratory/cpm_lab/tree/master/low_level_controller
Steps require Main Vehicle PCB to be connected to vehicle to provide power
For questions, please contact:
- Patrick Scheffe
1. Atmel Studio 7.0
- Start Atmel Studio 7.0
- Load current vehicle firmware solution "vehicle_atmega2560_firmware.atsln"
2. ICE Programmer
Make sure vehicle is powered off before connecting the programmer!
- Check pinout of Programmer, Vehicle and Connector Cable:
- With vehicle power OFF, connect ICE programmer AVR Port to JTAG header.
- Turn ON vehicle
- Connect to ATmega Chip using Device Programming
- Click Apply
- Click Read
- Set the correct fuses. The following fuses deviate from the default
|HIGH.EESAVE||Optional i.e. checked or unchecked|
|LOW.SUT_CKSEL||Ext. Crystal Osc. 8.0- MHz; Start-up time: 16 CK + 65ms|
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.
- Check the above settings again.
- Check external crystal oscillater on bottom side of board using oscilloscope (should be 16MHz)
4. Flash ATmega
- Flash chip using Start without Debugging
- Turn OFF vehicle
- Disconnect programmer
By setting a jumper, a test mode is activated. This allows testing the inputs and outputs without the MLC.