Trel725 / chavrprog

AVR programmer based on Chinese ch341a
GNU General Public License v3.0
58 stars 19 forks source link

Refactored flash write function. Fix programming mcu with page size 128 #5

Closed l0ud closed 5 years ago

l0ud commented 6 years ago

During testing, I noticed verification errors after page 0 on atmega88a. It turns out, calculating page address is not correct if page size=128. I didn't like hardcoded method to get cfg_write_shift and how that value is used, so I refactored and I think simplified the code.

I've tested this code with atmega32 and atmega88a. Unfortunately I cannot test on attiny13a (mine just isn't responding, probably it's default 1MHz clock is too slow for fixed ch341g SPI speed).

Trel725 commented 5 years ago

Thank you once more l0ud, and sorry for the late response. I do appreciate your work for this project.

Cheers