Attempting to flash Blink to a Pro Mini using an FTDI module, I got nowhere. But another identical Pro Mini worked fine. In the end, I reflashed the bootloader, and that fixed it. But I wonder if anything is known about what causes the bootloader to be corrupted. It has been several years since I used the Pro Mini, but I know it was working before. And the Pro Mini itself dates back to 2015. Does flash memory go bad over such a timespan?
If I had thought about it, I should have read out the bootloader code before reflashing it, to see what had gone bad. But I didn't.
No. Not if it's a genuine MicroChip part. Like everything in the entire universe, ICs are never 100.0000000000000000% perfect, so it could be a random defect. But the odds are heavily against it.
The flash procedure depends on a stable power supply, so if something was wrong with that back in 2015, you could have made a working, but unreliable flash image.
The initial attempt to flash Blink used the FTDI232 adapter connected to the Rx and Tx pins. But I flashed the firmware using Arduino as ISP (a Nano actually) connected to the SPI pins and Reset. I think that means I could have flashed Blink that way too, and it would have worked, but I needed the bootloader to be working, so I went for that. I was actually a bit surprised that it worked. I thought the Pro Mini was bricked, but it was just confused.
I guess the other thing that could have been corrupted is the fuses. They get rewritten automatically when the bootloader is flashed, so they could have gone bad too. If this happens again, I'll try to remember to read back out the bootloader and fuses and see what isn't as it should be.
If you uploaded a sketch with an ISP device (Like "Arduino as ISP") before you put the Pro Mini away, that would explain why you couldn't upload a new sketch with an FTDI module. Uploading a sketch with SPI erases the bootloader. Burning a new bootloader is the way to recover bootloader/serial upload.
No, sorry, I misspoke. I meant to say that I flashed the bootloader with the Nano as ISP. I don't think I've ever flashed normal firmware with an ISP except for breadboard Arduinos and such. I know what I was working on when the Pro Minis were last used, and I'm sure I flashed them normally, and successfully, with the FTDI adapter. But three years later, one of them still worked, but the other one didn't.