SmartieParts problems

Everything about the smartie programmer and backlight kit!
Post Reply
Posts: 3
Joined: Sat Sep 15, 2012 2:20 pm
Country: -

SmartieParts problems

Post by Patosan » Sat Sep 15, 2012 4:34 pm

Dear All, hope that someone can help with this one!

Having received my SmartieParts (rev. 2.3) I went about installing it in my Turnigy 9x.
What can I say, it cold not be easier!

I am however experiencing some issues with programming and reading data from the 9x.
When I first updated the unit with the latest er9x I got an error during verify, and a blank LCD in the 9x.
Hitting the 'Write flash' button a few more times still brought up the same message, but now I got the 'Bad EEPROM, hit any key to format' of the 9x LCD.
Pressing a key, the 9x formatted the EEPROM and I thought all was fine, just some glitch.

As I tried to read EEPROM I again got an error from AVRDUDE; 'wrong reading bytes b8'.
Same error presents itself when I tried to read the flash.

Here is a dump of the AVRDUDE output;
C:/Program Files/companion9x/avrdude.exe -c usbasp -p m64 -v -v -U flash:r:C:/Program Files/companion9x/templates/test.hex:i

avrdude.exe: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean,
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files\companion9x\avrdude.conf"

Using Port : lpt1
Using Programmer : usbasp
avrdude.exe: seen device from vendor -><-
avrdude.exe: seen product ->USBasp<-
Chip Erase delay : 9000 us
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 4 20 64 0 no 2048 8 0 9000 9000 0xff 0xff
flash 33 6 128 0 yes 65536 256 256 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 4 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : usbasp
Description : USBasp,

avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e9602
avrdude.exe: reading flash memory:

Reading | ####avrdude.exe: error: wrong reading bytes b8

AVRDUDE done - exit code 1

To resolve this I have tried/checked;
I have rev. 2 of the board in the 9x
Drivers are working fine
I have tried several different USB cables (ones I used for other embedded projects as well)
Re-opened the 9x to clean the pads, and confirmed that the pads have little indentations from the pogos.

What should I try next?
Has anyone experience this as well?


User avatar
Rob Thomson
Site Admin
Posts: 4542
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford

Re: SmartieParts problems

Post by Rob Thomson » Sat Sep 15, 2012 4:52 pm

Patosan wrote:
Using Port : lpt1
Using Programmer : usbasp
I think the bold above is your problem.

In companion, go too:

burn -> configure

Set the port to usb.

That I believe should do it?

Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!

Posts: 3
Joined: Sat Sep 15, 2012 2:20 pm
Country: -

Re: SmartieParts problems

Post by Patosan » Sat Sep 15, 2012 5:47 pm

Dear Rob,

Agree that the port looks 'wrong'.
When I did my first tests I had port set to 'usb', but then found a post in different forum saying that someone had fixed another issue by leaving the port blank.
In desperation I tried that trick to no avail, but I guess port defaults to 'lpt1'?
I have repeated the test and the results are the same, but the port now reads correctly (not including the whole lot this time);

Using Port : usb
Using Programmer : usbasp

Interesting anyway that it identifies the port as 'lpt1' and still picks up the hardware on 'usb'.
Perhaps I should also mention that in 99% of the cases the error is "wrong reading bytes b8", but I have had on rare occasions "wrong reading bytes a8" as well.


Posts: 3
Joined: Sat Sep 15, 2012 2:20 pm
Country: -

Re: SmartieParts problems

Post by Patosan » Sun Sep 16, 2012 5:37 pm

Interesting development!
(If I in anyway state the obvious below, and appear as a complete beginner, I apologise but I am).

Tried several times to remove/re-install the driver; same error every time - "...wrong reading bytes b8".

Checked usbasp source code and found that this error implies that the number of bytes received are not as expected.

Since I can not readily make any mods to the usbasp, I decided to investigate if Avrdude was behaving as it should.
The version of Avrdude that is installed with latest version of Companion9x (ver. 0.98, rev. 1407) is 5.10.
I downloaded Avrdude 5.11, renamed the old version and put the new files ('exe' and 'conf') in the Companion9x.
Trying to read from the flash now also initially fails with "...wrong reading bytes b8", but after that Avrdude appears to retry with some sort of 'slow mode' that does not fail.
I also tried to install everything to another computer (Win7), and here everything works 'out of the box' (with Avrdude 5.10), so it is not an issue with SmartieParts or the 9x.
It appears as if the older PC (XP sp3) has some issues communicating with SmartieParts using version 5.10 of Avrdude.

To check everything I have flashed the 9x several times and uploaded the flash, then compared the results with a hex-editor.
Here are the findings;
Using PC with XP sp3, and Avrdude 5.11
1) Flashed with er9x, r775
2) Followed instruction on LCD, formatted the EEPROM
3) Uploaded contents in flash several times (in case they were not identical due to 'read problems')
Findings: all hex uploads in 3) were identical, but different from file used for flash in 1).
This leads me to believe that some formatting, scrambling the original 'file', occurs during flash/formatting.

Using PC with Win7 and Avrdude 5.10
4) Flashed with er9x, r775
5) Uploaded flash contents
6) Formatted according to instructions on LCD screen
7) Uploaded flash contents
Findings: hex uploads from 5) and 7) are different, and they are both different from 4).
But most important, comparing uploaded flash contents obtained in 3) and 7), they are identical.
Apparently some scrambling/formatting occurs in two stages; when flashing and when formatting according to instructions on LCD.

There are some issues with my usb on my PC with XP sp3.
Avrdude 5.11 appears to handle this by reverting to some 'slow mode', while Avrdude 5.10 does not.

More testing is required to fully conclude that Avrdude 5.11 is 'the solution'.
For example I need to confirm that writing flash and EEPROM works as expected every time.
If I have issues with reading, it cold be a fair assumption that there will also be some issues with writing!

Would it be possible for anyone else to please comment on my findings, and perhaps share similar issues?
Could this be a solution to the experienced problems?


Post Reply