Fast, cheap and reliable option to burn your firmware into the flash.
- Pull the PTA4 pin to the ground. Just connect the low-side (close to MCU input) of the pull-up R5 resistor to the ground. It is safe with 10k resistor.
- Plug in your CW Husky/Lite device to the USB port.
- Release connection to ground in 2-3 seconds. Your MCU will be in the ISP mode.
- Install the python package by pip install spsdk (if not installed)
- Connect your UART adapter to the RX/TX/GND of the main CW308/CW313 board
- Erase the flash by python -m spsdk.apps.blhost -p /dev/cu.usbserial-A5069RR4,115200 flash-erase-all
- Burn firmware by python -m spsdk.apps.blhost -p /dev/cu.usbserial-A5069RR4,115200 write-memory 0x0 /path/to/simpleserial-aes-CW308_K82F.bin
You should see something like this
bash-3.2$ python -m spsdk.apps.blhost -p /dev/cu.usbserial-A5069RR4,115200 flash-erase-all
Response status = 0 (0x0) Success.
bash-3.2$ python -m spsdk.apps.blhost -p /dev/cu.usbserial-A5069RR4,115200 write-memory 0x0 simpleserial-aes-CW308_K82F.bin
Writing memory [####################################] 100%
Response status = 0 (0x0) Success.
Response word 1 = 13720 (0x3598)
Done!