ryan-ma / PD_Micro

USB-C PD3.0 PPS on ATMega32U4 Arduino board
MIT License
383 stars 69 forks source link

Bootloader #8

Closed gcormier closed 1 year ago

gcormier commented 2 years ago

I'm losing my mind with this Caterina bootloader. Having a TON of issues on Windows and Linux. Has anyone else had issues?

Button toggling has inconsistent behavior.. serial port continuously disconnecting... I've reflashed the bootloader with no real change in behaviour.

I guess I could just outright wipe it and stick to my AVR programmer? Seems like a pity but really not sure what to do.

gcormier commented 2 years ago

I switched to Windows for now. So I have the Arduino Blink sketch flashed for fun. This causes the 1A led to blink on/off every second.

When I compile and upload from PlatformIO.

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  32.0% (used 819 bytes from 2560 bytes)
Flash: [=====     ]  48.5% (used 13918 bytes from 28672 bytes)
Configuring upload protocol...
AVAILABLE: avr109
CURRENT: upload_protocol = avr109
Looking for upload port...
Auto-detected: COM3
Forcing reset using 1200bps open/close on port COM3
Waiting for the new upload port...
Error: Couldn't find a board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
*** [upload] Explicit exit, status 1
============================================================================================================================================== [FAILED] Took 6.56 seconds ==============================================================================================================================================
The terminal process "C:\Users\Greg\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

And now, the RX/TX won't stop blinking. Clicking reset will briefly turn off the leds while depressed, then they resume blinking. Holding reset for any amount of time will turn off the LEDs, then they resume blinking. Unplugging the PD Micro is the only way to return to normal blink.