Skip to content

"Error: Operation timed out" when writing to EEPROM. #95

@kaptsanovb

Description

@kaptsanovb

Flashing code and reading EEPROM works fine, but writing does not. Here is the output of wchisp --verbose eeprom write eeprom.bin:

16:23:20 [INFO] Opening USB device #0
16:23:20 [DEBUG] (1) wchisp::transport::usb: Found USB Device Bus 001 Device 063: ID 4348:55e0
16:23:20 [DEBUG] (1) wchisp::transport: => a11200   00004d4355204953502026205743482e434e
16:23:20 [DEBUG] (1) wchisp::transport: <= a1760200 5211
16:23:20 [DEBUG] (1) wchisp::transport: => a11200   00004d4355204953502026205743482e434e
16:23:20 [DEBUG] (1) wchisp::transport: <= a1760200 5211
16:23:20 [DEBUG] (1) wchisp::flashing: found chip: CH552[0x5211]
16:23:20 [DEBUG] (1) wchisp::transport: => a70200   1f00
16:23:20 [DEBUG] (1) wchisp::transport: <= a7761a00 1f00ffffffffffffffffff523d39000205009586a0bc00000000
16:23:20 [DEBUG] (1) wchisp::flashing: read_config: ffffffffffffffffff523d39000205009586a0bc00000000
16:23:20 [DEBUG] (1) wchisp::transport: => a11200   52114d4355204953502026205743482e434e
16:23:20 [DEBUG] (1) wchisp::transport: <= a1760200 5211
16:23:20 [DEBUG] (1) wchisp::transport: => a70200   1f00
16:23:20 [DEBUG] (1) wchisp::transport: <= a7761a00 1f00ffffffffffffffffff523d39000205009586a0bc00000000
16:23:20 [INFO] Erasing EEPROM(Data Flash)...
16:23:20 [DEBUG] (1) wchisp::transport: => a90500   0000000001
16:23:20 [DEBUG] (1) wchisp::transport: <= a9760200 0000
16:23:20 [INFO] Erased 1 data flash sectors
16:23:20 [INFO] EEPROM erased
16:23:20 [INFO] Read 128 bytes from bin file
16:23:20 [INFO] Writing EEPROM(Data Flash)...
16:23:20 [DEBUG] (1) wchisp::transport: => a31e00   000000000000000000000000000000000000000000000000000000000000
16:23:20 [DEBUG] (1) wchisp::transport: <= a3760200 0a00
16:23:20 [DEBUG] (1) wchisp::transport: => aa3d00   00000000fcf776888888888836888888888888883688888888888888368888888888888836888888888888883688888888888888368888888888888836
Error: Operation timed out

Here is the device info:

16:23:51 [INFO] Opening USB device #0
16:23:51 [INFO] Chip: CH552[0x5211] (Code Flash: 14KiB, Data EEPROM: 128 Bytes)
16:23:51 [INFO] Chip UID: 95-86-A0-BC-00-00-00-00
16:23:51 [INFO] BTVER(bootloader ver): 02.50
16:23:51 [INFO] Current config registers: ffffffffffffffffff52bd39000205009586a0bc00000000
REVERSED: 0xFFFFFFFF
WPROTECT: 0xFFFFFFFF
  [0:0]   NO_KEY_SERIAL_DOWNLOAD 0x1 (0b1)
    `- Enable
  [1:1]   DOWNLOAD_CFG 0x1 (0b1)
    `- P4.6 / P15 / P3.6(Default set)
GLOBAL_CFG: 0x39BD52FF
  [15:15] CODE_PROTECT 0x0 (0b0)
    `- Forbid code & data protection
  [14:14] NO_BOOT_LOAD 0x1 (0b1)
    `- Boot from 0xf400 Bootloader
  [13:13] EN_LONG_RESET 0x0 (0b0)
    `- Short reset
  [12:12] XT_OSC_STRONG 0x1 (0b1)
    `- Enhanced
  [11:11] EN_P5.7_RESET 0x0 (0b0)
    `- Forbid
  [10:10] EN_P0_PULLUP 0x0 (0b0)
    `- Forbid
  [9:8]   RESERVED 0x2 (0b10)
    `- Default
  [7:0]   RESERVED 0xFF (0b11111111)
    `- Default

Here is the output of hexdump eeprom.bin:

0000000 0180 ffff ffff ffff ffff ffff ffff ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000080

I am using Linux Mint 22.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions