Re: [OpenXC] Flashing firmaware in OSX Sierra stk500_2_ReceiveMessage(): timeout

30 views
Skip to first unread message

Eric Marsman

unread,
Apr 25, 2017, 12:19:31 PM4/25/17
to ope...@googlegroups.com
Hi,

You are using a *FORDBOARD.bin file. Please use the correct *CROSSCHASM_C5_BLE-ctv7.2.0.hex file.

You also need to run the command within the first 5 seconds.

Regards,
Eric


On Tue, Apr 25, 2017 at 11:27 AM, <mll...@rtafleet.com> wrote:
Hi,

I have the CROSSCHASM C5 BLE VI and have been trying to flash it with the firmware on a Mac running OSX Sierra (10.12) but keep getting stk500_2_ReceiveMessage(): timeout

I'm running  this:

avrdude -U flash:w:vi-firmware-FORDBOARD.bin -c stk500 -p 32MX795F512L -C avrdude.conf -P /dev/tty.usbmodem1411


The device itself has a red flashing light when you connect it to USB and if I run the flashing command after the 5 seconds, the led turns blue but I still get the timeout error. If I run the command within 5 seconds, the led turns a redish/blueish mixed color and same timeout

The device is indeed listed in /dev/tty.usbmodem1411


This is the verbose output from avrdude:

avrdude: Version 5.10, compiled on Apr 24 2017 at 16:03:06
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "avrdude.conf"
         User configuration file is "/Users/marcos/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1411
         Using Programmer              : stk500
         AVR Part                      : 32MX795F512L
         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    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    524288  256   2048  4500  4500 0x00 0x00
           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 : STK500V2
         Description     : Atmel STK500
         Programmer Model: STK500
         Hardware Version: 0
         Firmware Version Master : 0.00
         Topcard         : Unknown
         Vtarget         : 0.0 V
         SCK period      : 0.1 us
         Varef           : 0.0 V
         Oscillator      : Off

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x504943
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "vi-firmware-FORDBOARD.bin"
avrdude: input file vi-firmware-FORDBOARD.bin auto detected as raw binary
avrdude: writing flash (161664 bytes):

Writing |                                                    | 0% 0.00savrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout

Any suggestions?
Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "OpenXC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxc+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/openxc.
To view this discussion on the web visit https://groups.google.com/d/msgid/openxc/01262f11-84a1-4bd7-bf3d-715822d695c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mll...@rtafleet.com

unread,
Apr 25, 2017, 12:34:52 PM4/25/17
to OpenXC
Thank you for your quick reply Eric,

Using the Hex I confirm I can now flash any of the firmwares:

vi-default-firmware-CROSSCHASM_C5_BLE-ctv7.2.0.hex
vi-emulator-firmware-CROSSCHASM_C5_BLE-ctv7.2.0.hex
vi-obd2-firmware-CROSSCHASM_C5_BLE-ctv7.2.0.hex
vi-translated_obd2-firmware-CROSSCHASM_C5_BLE-ctv7.2.0.hex

The issue now seems to be that while the flash worked, I can't communicate with the device via USB; for instance


$ openxc-control version --format protobuf
Can't read from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Can't read logs from data source -- stopping: ("USB device couldn't be read", USBError(60, 'Operation timed out'))
Device is running version None

I already have libusb 1.0 installed:

$ brew install libusb
Warning: libusb-1.0.20 already installed
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

As well as python 2.7.10:

$ python --version
Python 2.7.10


Thanks again.
To unsubscribe from this group and stop receiving emails from it, send an email to openxc+un...@googlegroups.com.

Kanishka Vedi

unread,
Apr 26, 2017, 3:17:31 AM4/26/17
to OpenXC
Hi,

Glad that you are able to flash the firmwares. 

I see the command you used "$ openxc-control version --format protobuf" has protobuf format. Are you using the firmware that supports protobuf format? You will get version using this command if you are using protobuf format in your firmware. 
For json, you may try this - 

$ openxc-control version

or

$ openxc-control version --format json

Regards
Kanishka
Reply all
Reply to author
Forward
0 new messages