You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Slappy, may I have some help please? I am trying to learn
I flash blinky, but I see no light. See my cargo run output below
Also, is it normal I need to pull usb out, hold down bootloader button, and plug usb in again to flash? And if I wait too long I cant flash and have to pull usb out again. Is there easier way?
Thank you
❯ cargo run --example blinky
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `wchisp flash target\riscv32imac-unknown-none-elf\debug\examples\blinky`
06:16:47 [INFO] Chip: CH582[0x8216] (Code Flash: 448KiB, Data EEPROM: 32KiB)
06:16:47 [INFO] Chip UID: 24-7F-A9-26-3B-38-08-DE
06:16:47 [INFO] BTVER(bootloader ver): 02.40
06:16:47 [INFO] Current config registers: ffffffffffffffff4f3f0f4d
RESERVED: 0xFFFFFFFF
WPROTECT: 0xFFFFFFFF
[0:0] NO_KEY_SERIAL_DOWNLOAD 0x1 (0b1)
`- Enable
[1:1] DOWNLOAD_CFG 0x1 (0b1)
`- PB22(Default set)
USER_CFG: 0x4D0F3F4F
[2:0] RESERVED 0x7 (0b111)
`- Changed
[3:3] CFG_RESET_EN 0x1 (0b1)
`- Enable
[4:4] CFG_DEBUG_EN 0x0 (0b0)
`- Disable
[5:5] RESERVED 0x0 (0b0)
[6:6] CFG_BOOT_EN 0x1 (0b1)
`- Enable
[7:7] CFG_ROM_READ 0x0 (0b0)
`- Disable the programmer to read out, and keep the program secret
[27:8] RESERVED 0xD0F3F (0b11010000111100111111)
`- Changed
[31:28] VALID_SIG 0x4 (0b100)
`- Valid
06:16:47 [INFO] Read target\riscv32imac-unknown-none-elf\debug\examples\blinky as ELF format
06:16:47 [INFO] Found loadable segment, physical address: 0x08000000, virtual address: 0x08000000, flags: 0x5
06:16:47 [INFO] Section names: [".text"]
06:16:47 [INFO] Found loadable segment, physical address: 0x080011e0, virtual address: 0x080011e0, flags: 0x4
06:16:47 [INFO] Section names: [".rodata"]
06:16:47 [INFO] Firmware size: 6144
06:16:47 [INFO] Erasing...
06:16:47 [WARN] erase_code: set min number of erased sectors to 8
06:16:47 [INFO] Erased 8 code flash sectors
06:16:48 [INFO] Erase done
06:16:48 [INFO] Writing to code flash...
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 6144/614406:16:50 [INFO] Code flash 6144 bytes written
06:16:50 [INFO] Verifying...
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ 6144/614406:16:52 [INFO] Verify OK
06:16:52 [INFO] Now reset device and skip any communication errors
06:16:52 [INFO] Device reset
The text was updated successfully, but these errors were encountered:
You could also try the uart example and see if anything is landing on console. Your logs suggest the device flashed successfully. Perhaps your led is on a different pin? Can you link to the board you used? Were you able to flash in any of the
The procedure you give to flash the board sounds correct to me. Personally, I keep PB22 grounded and powercycle before each flashing, but that should be equivalent to your procedure. Have you tested your procedure on any of the code from the "official" repo? https://github.com/openwch/ch583
I use wchisp to flash https://github.com/WeActStudio/WeActStudio.WCH-BLE-Core/blob/master/Examples/CH582/template/obj/template.hex and now led blinking. Cool!
Hello Slappy, may I have some help please? I am trying to learn
I flash blinky, but I see no light. See my cargo run output below
Also, is it normal I need to pull usb out, hold down bootloader button, and plug usb in again to flash? And if I wait too long I cant flash and have to pull usb out again. Is there easier way?
Thank you
The text was updated successfully, but these errors were encountered: