Open houdonghui1 opened 1 year ago
Hello,
The SAM3X firmware uses the same firmware loading as ChipWhisperer, so it works in Python (Windows or Linux). The FW update mechanism is described at https://chipwhisperer.readthedocs.io/en/latest/scope-api.html#firmware-update .
If the SAM3X is blank, use:
import chipwhisperer as cw
programmer = cw.SAMFWLoader(scope=None)
programmer.program(<port>, 'CW310.bin')
Where
CW310 is built from running make
here: https://github.com/newaetech/cw310-bergen-board/tree/main/microfw/CW310/src
Hi Colinoflynn, When I trying to do SAM3X with: programmer = cw.SAMFWLoader(scope=target) programmer.enter_bootloader(really_enter=True)
I see all the power are down in CW310 board, and cannot get the target for ever. Do you know why this occurring? Before this erasing, I can use the USB-C Data to get the target and do fpga_read and fpga_write already. Now all are not working as all power off. Thanks, Vienna
Hello,
This will just erase the SAM3X, does it come back up as a serial port? Are you on Windows or Linux? If on Linux you can check dmesg
to see if the SAM3X comes up as a serial port. If you press the "USB RST" button, it will reenumeate the SAM3X which might make it more obvious (or unplug/replug USB cable):
The command from there is:
import chipwhisperer as cw
programmer = cw.SAMFWLoader(scope=None)
programmer.program(<port>, 'CW310.bin')
Where CW310.bin is available here. Just download to your local file.
If the serial port isn't coming up, it could be the erase failed. There is an "erase" jumper (pins) on the PCB, you can short with a paperclip/wire which should also force the erase.
Hi colinoflynn, Your method works. As the target cannot be get, I have to use the scope=None instead of scope=target in cw.SAMFWLoader. And the program is working. Thank you very much for the quick guidance. Regards, Vienna
Hi colinoflynn, The bin file "CW310 is built from running make here: https://github.com/newaetech/cw310-bergen-board/tree/main/microfw/CW310/src" has a problem that the byte counter of the bit 0 and bit 1 are by default as 1, which is not working for plaintext and key write (any other 16 bytes write will be failed: I added a workaround to not use the lowest 2 bits and find out that it is not supporting bit index 5 and index 6. Could you help to check why? Thanks, Vienna
Hello engineers!! How can I load the firmware on the CW310 board onto the SAM3X on my board? Under what operating system can software be used to load firmware onto the MCU? Is there a method explanation?