Open sleemanj opened 7 years ago
What processor is on USBasp device? Many of the USBasp devices have atmega48 processors. The atmega48 only has 4k of flash and so on that part the TPI code is removed. But averdude should report an error if TPI mode is attempted.
Both are ATMega8A
The output indicates that TPI is working but it's not actually writing anything - it reads stuff out fine it seems (signature and verification of existing contents).
I also tried forcing the bitclock slower (notice the writing time for the fischl is 3x the (non-)writing time for 1.06a), makes no difference.
I should have RTF Datasheet!
The ATTiny 4/5/9/10 require 5v to program them.
I had the USBasp with the 1.06a firmware set to 3v3 output, so it was able to read but not enough juice to actually flip any bits.
Maybe a note in the README.md, I see somebody else was having similar problems in the Arduino forums a year or so back, I bet it was the same.
Short story, I have not investigated far, ATTiny5
Writing flash with TPI on 1.06a firmware (prebuilt binary) doesn't actually appear to modify the flash,
The existing firmware on the target is unmodified (evidenced by the behaviour of the target being that specified by the previous flash contents) indicating that even though it said it wrote flash, it didn't, and hence the verification error.
Usnig the current fischl firmware it works fine.
Now, beware when testing, the verification in 1.06a firmware DOES work, so if you successfully write the flash with the fischl firmware, then try to write the same flash contents using the 1.06a firmware, it will look like it all worked fine, but it didn't, it still didn't write the flash it just passes verification because it was already written previously. So in other words, every time you do a test, make sure your flash content you are testing with is unique.