AVR-Programmer icon indicating copy to clipboard operation
AVR-Programmer copied to clipboard

CH552: SPI auto-clock feature is potentially dangerous

Open dfxhub opened this issue 2 years ago • 1 comments

picoISP Programmer - CH552E

SPI auto-clock feature is potentially dangerous - bricked my 328p pro mini (clone, only HVPP revived the chip). "Detected" SPI speed is very aggressive - on the minimum allowed values that leads to instability during programming, even reading may fail (in my case - 16MHz CH552T, 16MHz 328p as a target - "detected" divider was turned out 3 - about 3 tclcl - minimum allowed, according to the datasheet). Original ArduinoISP cotains more liberal settings. As a workaround I've set SPI0_CK_SE += 3 to the divider at the end of the detection alg.

dfxhub avatar Oct 27 '23 21:10 dfxhub

Hi, thank you for the hint and your solution to the problem. The problem doesn't occur to me, but to be on the safe side in the future, I have reduced the maximum speed so that it now complies with the data sheet.

wagiminator avatar Oct 28 '23 18:10 wagiminator