Hello,
I'm currently working on a piece of code on an Arduino MKR Zero that should cryptographically sign messages. Communication is done via webUSB.
The issue is: when i plug the arduino into an untrusted pc I don't want the flash to be read/written via usb. (eg reflash)
My Arduino zero's bootloader does autoreset when the board is 'touched' by the magic baud rate of 1200bps.
Can the autoreset be disabled such as the bootloader is loaded only if the reset button is pressed?
Are there other security features to be enabled? I'm a newbie in fuse-bits, bootloaders, etc. I usually write higer level code.
PS: I tried the 120ohm / 10uF between RST and 3.3V/GND but it doesn't work, as the reset is from software.
Thanks!
LE: SOLVED!
I modified the core for samd boards in C:\Users(username)\AppData\Local\Arduino15\packages\CDD.cpp
This has the effect of disabling the reset when the 1200bpm touch comes.
// auto-reset into the bootloader is triggered when the port, already
// open at 1200 bps, is closed. We check DTR state to determine if host
// port is open (bit 0 of lineState).
if (_usbLineInfo.dwDTERate == 1200 && (_usbLineInfo.lineState & 0x01) == 0 && 0)
{
initiateReset(250);
}