Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH552: SPI auto-clock feature is potentially dangerous #3

Open
dfxhub opened this issue Oct 27, 2023 · 1 comment
Open

CH552: SPI auto-clock feature is potentially dangerous #3

dfxhub opened this issue Oct 27, 2023 · 1 comment

Comments

@dfxhub
Copy link

dfxhub commented Oct 27, 2023

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 dfxhub changed the title CH552: SPI auto-speed feature is potentially dangerous CH552: SPI auto-clock feature is potentially dangerous Oct 27, 2023
@wagiminator
Copy link
Owner

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 pushed a commit that referenced this issue Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants