Skip to content

CH59x: initial support in minichlink through "unknown-chip-type" #574

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions minichlink/pgm-wch-linke.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static int LESetupInterface( void * d )
break;
}

// TODO: What in the world is this? It doesn't appear to be needed.
// Set CLK Speed, 0x0C (0x01: 6000kHz, 0x02: 4000kHz, 0x03: 400kHz)
wch_link_command( dev, "\x81\x0c\x02\x09\x01", 5, 0, 0, 0 ); //Reply is: 820c0101

// Note from further debugging:
Expand Down Expand Up @@ -513,7 +513,7 @@ static int LESetupInterface( void * d )
// Recommended to switch to 05 from 09 by Alexander M
// wch_link_command( dev, "\x81\x11\x01\x09", 4, (int*)&transferred, rbuff, 1024 ); // Reply: Chip ID + Other data (see below)

if( unknown_chip_fallback )
if( unknown_chip_fallback || chip == CHIP_CH59x )
{
// This is a little cursed. If we're in fallback mode, none of the other chip-specific operations will work
// the processor will be in a very cursed mode. We can't trust it.
Expand Down
Loading