adafruit / uf2-samdx1

MSC bootloader (based on UF2) for SAMD21
Other
210 stars 182 forks source link

MKR Vidor 4000 Arduino Sketch Upload halts at around 50% only when loaded via uf2 bootloader #199

Open TheMindVirus opened 1 year ago

TheMindVirus commented 1 year ago

Great work on the MKR Vidor 4000 support so far, I've used it to upload a working Heartbeat sketch to the board. It works! image

The only thing is for larger sketches, e.g. for the Vidor Graphics library, the sketch upload stalls at around 50% when it reaches a write at 0x40000. This only happens when it's been loaded with the new loader released 5 days from the time of writing. I have switched back and forth and it's not an issue on the sam-ba stock firmware that shipped with the board.

I had also drafted a quick minimal version of the Vidor Graphics library which fits just below 0x40000 and that uploaded but for obvious reasons didn't load the bitstream.

sketch_upload_working_stock_firmware.txt sketch_upload_interrupted_uf2_loaded.txt

The new bootloader makes it 10x easier to switch between arduino and circuitplayground_express which also loads on the vidor, but without a USB drive on that particular uf2. The USB drive shows up when it's loaded with another minimal uf2 e.g. feather_m0_adalogger and some others for ATSAMD21G18A. E18A also loads but with limited i/o pins available (missing PortB). A basic LED test worked well with digitalio on PB08 which is an inverted Red LED on the board.

board_id = "circuitplayground_express"

D1,A7,TX = PB08 #RED_LED_INVERTED

D5_RIGHTBUTTON = PA14 #JTAG_TMS
D12_REMOTEIN = PA12 #JTAG_TDI
D36_LISIRQ = PA13 #JTAG_TCK
D7_SLIDESWITCH = PA15 #JTAG_TDO

I2S_DO = PA08 #SDA
A9_TEMP_SENSE = PA09 #SCL

This is the version I loaded, looking forward to future updates on this: https://github.com/adafruit/uf2-samdx1/releases/download/v3.15.0/bootloader-mkrvidor4000-v3.15.0.bin