CAN485 Uploading Code/Flashing Bootloader Issues

Hey Everyone!

I uploaded code one time to my CAN 485 and now I can’t seem to do it again ;/

The code on the board functions correctly and I can even talk to it via the serial monitor

I’m uploading code via FTDI FT232RL with a very similar circuit as https://www.sparkfun.com/products/9716 minus the indicator lights.

When trying to upload the code via the normal USB<–>UART interface I get the following compilation readouts and errors:

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM13
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : AT90CAN128
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     8    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         65     6   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 6.2
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9781 (probably c128)
avrdude: reading input file "C:\Users\XXXXXXXXXX\AppData\Local\Temp\arduino_build_477811/XXXXXXXXXX.ino.hex"
avrdude: writing flash (11682 bytes):

Writing | ################################################## | 100% 2.20s

avrdude: 11682 bytes of flash written
avrdude: verifying flash memory against C:\Users\XXXXXXXXXX\AppData\Local\Temp\arduino_build_477811/XXXXXXXXXX.ino.hex:
avrdude: load data flash data from input file C:\Users\XXXXXXXXXX\AppData\Local\Temp\arduino_build_477811/XXXXXXXXXX.ino.hex:
avrdude: input file C:\Users\XXXXXXXXXX\AppData\Local\Temp\arduino_build_477811/XXXXXXXXXX.ino.hex contains 11682 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.43s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x14 != 0x0c
avrdude: verification error; content mismatch

avrdude done.  Thank you.

the selected serial port 
 does not exist or your board is not connected

Reading online it looks like maybe a lock bit was set or something? Not quite sure…so I went to flash a bootloader via an arduino as ISP (with an uno) but oddly enough I just get an error message that it sees a different device signature, this time 0x1e950f as opposed to the “correct” one from earlier of 0x1e9781, so it kicks me out of the bootloader…here are those messages…

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM7
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
An error occurred while uploading the sketch
         AVR Part                      : AT90CAN128
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     8    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         65     6   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: Expected signature for AT90CAN128 is 1E 97 81
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

So I’m at a loss :confused: What would happen if I would just force the bootloader? Any change of bricking the chip? Any one have an idea?

Thanks for your time!

I’m having the exact same problem. Did you ever get a reply?

How would you “force” the bootloader?

Thanks

Does clicking the reset button work? Maybe double clicking?

Clicking the reset button didn’t help. Clicking and holding for 5, 10 and 20 seconds didn’t help and double clicking didn’t help.