View Single Post
Old 02-14-2012, 07:29 PM   #5469 (permalink)
DJBecker
EcoModding Apprentice
 
Join Date: Nov 2010
Location: Annapolis
Posts: 159
Thanks: 0
Thanked 32 Times in 27 Posts
Quote:
Originally Posted by swoozle View Post
Paul (or anyone),

This implies that you can program through the serial connection (not the ISP) if the chip has the bootloader. Are there details on how to do that somewhere? Is it just a matter of a standard serial cable and ponyprog or equivalent?
Be very, very careful if you use a serial bootload on the AVR.

We built our first controller around the Arduino Mega board, with signal conditioning and the CAN controller on a shield and a separate isolated gate driver board. It was very convenient for development. The 'C' build environment took only a few minutes to work out, programming was easy and reliable, and serial output came over the same USB cable used for programming. (Quite unlike the nest of cables we now use to program and monitor our STM32 board.)

However, the system had a serious flaw. The serial bootloader takes over for a few seconds after reset, listening for a re-program command. During that second, it controls a bunch of pins. Including our gate drive output. It would switch the gate driver full-on for a second or two. That's 100% duty cycle into a stopped motor. If we left the contactor turned on, we were almost certain to burn something out.
  Reply With Quote
The Following User Says Thank You to DJBecker For This Useful Post:
Sunny2 (07-13-2014)