@@ -1089,8 +1089,18 @@ int DefaultDetermineChipType( void * dev )
1089
1089
switch ( chip_type )
1090
1090
{
1091
1091
case 0x103 :
1092
- fprintf ( stderr , "Autodetected a ch32v10x\n" );
1093
- iss -> target_chip_type = CHIP_CH32V10x ;
1092
+ // V103 Special chip ID location: 0x1ffff884
1093
+ // CH32V103C8T6-0x25004102
1094
+ // CH32V103R8T6-0x2500410F
1095
+ // L103 Special chip ID location: 0x1ffff704
1096
+ // CH32L103C8T6-0x103107x0
1097
+ // CH32L103F8P6-0x103A07x0
1098
+ // CH32L103G8R6-0x103B07x0
1099
+ // CH32L103K8U6-0x103207x0
1100
+ // CH32L103F8U6-0x103D07x0
1101
+ // can be find in DBGMCU_GetCHIPID in \EVT\EXAM\SRC\Peripheral\src\chxxx_dbgmcu.c
1102
+ fprintf ( stderr , "Autodetected a ch32l10x\n" );
1103
+ iss -> target_chip_type = CHIP_CH32L10x ;
1094
1104
break ;
1095
1105
case 0x035 : case 0x033 :
1096
1106
fprintf ( stderr , "Autodetected a ch32x03x\n" );
@@ -1365,7 +1375,8 @@ static int DefaultWriteWord( void * dev, uint32_t address_to_write, uint32_t dat
1365
1375
// c.ebreak
1366
1376
MCF .WriteReg32 ( dev , DMPROGBUF3 ,
1367
1377
(iss -> target_chip_type == CHIP_CH32V003 || (iss -> target_chip_type >= CHIP_CH32V002 && iss -> target_chip_type <= CHIP_CH32V006 )
1368
- || iss -> target_chip_type == CHIP_CH32X03x || iss -> target_chip_type == CHIP_CH641 || iss -> target_chip_type == CHIP_CH643 ) ?
1378
+ || iss -> target_chip_type == CHIP_CH32X03x || iss -> target_chip_type == CHIP_CH32L10x
1379
+ || iss -> target_chip_type == CHIP_CH641 || iss -> target_chip_type == CHIP_CH643 ) ?
1369
1380
0x4200c254 : 0x42000001 );
1370
1381
1371
1382
MCF .WriteReg32 ( dev , DMPROGBUF4 ,
@@ -2157,7 +2168,7 @@ void PostSetupConfigureInterface( void * dev )
2157
2168
iss -> sector_size = 256 ;
2158
2169
break ;
2159
2170
case CHIP_CH32X03x :
2160
- case CHIP_CH32V10x :
2171
+ case CHIP_CH32L10x :
2161
2172
case CHIP_CH643 :
2162
2173
iss -> sector_size = 256 ; // ??? The X035 datasheet clearly says this is 128 bytes, but fast page erases do 256?
2163
2174
break ;
@@ -2519,7 +2530,8 @@ int DefaultUnbrick( void * dev )
2519
2530
2520
2531
const uint8_t * option_data =
2521
2532
(iss -> target_chip_type == CHIP_CH32V003 || (iss -> target_chip_type >= CHIP_CH32V002 && iss -> target_chip_type <= CHIP_CH32V006 )
2522
- || iss -> target_chip_type == CHIP_CH32X03x || iss -> target_chip_type == CHIP_CH641 || iss -> target_chip_type == CHIP_CH643 ) ?
2533
+ || iss -> target_chip_type == CHIP_CH32X03x || iss -> target_chip_type == CHIP_CH32L10x
2534
+ || iss -> target_chip_type == CHIP_CH641 || iss -> target_chip_type == CHIP_CH643 ) ?
2523
2535
option_data_003_x03x : option_data_20x_30x ;
2524
2536
2525
2537
DefaultWriteBinaryBlob (dev , 0x1ffff800 , 16 , option_data );
0 commit comments