johnnydrazzi / USB-uC

USB MSD Bootloader for PIC Microcontrollers
GNU General Public License v3.0
33 stars 9 forks source link

Pre-built USB_uC_145X_GENERAL_NO_XTAL.hex not working #5

Open qwertymodo opened 1 month ago

qwertymodo commented 1 month ago

I've been trying for awhile to get the latest pre-built USB_uC_145X_GENERAL_NO_XTAL.hex file (CRC:DA31352F) working, and it seems to be configured incorrectly. According to the source, the 145X_GENERAL config expects the boot switch on RA3, which is the !MCLR pin, but the provided hex file enables the MCLRE config bit, so pressing that just holds the chip in reset. Fixing the config bits to disable MCLRE and LVP (which forces MCLRE) fixes that particular issue, but then the switch doesn't work properly to load into the bootloader, so once the user program has been flashed, I'm unable to get into the bootloader at all anymore, it just boots into the user program every time from then on unless I re-flash the bootloader with a PICKit. Am I missing something here? My board is the absolute minimal setup, just the chip, USB connector, decoupling caps on Vcc and Vusb3v3, a tact switch between RA3 and Gnd.

qwertymodo commented 1 month ago

If anybody sees this issue before it gets fixed, here's a working build of the Assembly Version, for the PIC145X chips. Due to the smaller size, the user program should be configured to start at 0x800, not 0x1000 like the documentation says. Also, assembling this version yourself is a bit annoying, because it was written for the now-deprecated MPASM, so you'll need MPLAB X v5.35 or older to build it.

USB_uC_16F145X_ASM.X.production.zip

johnnydrazzi commented 1 week ago

Thanks for reporting this. I’ll take a look and revise shortly.