I'm making a PCB for a personal project using the STM32L031K6T7 microcontroller. It looks like this uC has a bootloader that can be used to reprogram the flash program mem through UART or SPI. It also has SWD pins.
So, does that mean I have two entirely separate but equally valid methods to program this uC if I want? I understand I'm able to interface to SWD using my j-link debugger, but how would I interface to the bootloader method?
My guess is that I'd need a device to interface between my computer's USB and the UART or SPI bus of the uC, but I'm not 100% sure. And then I'm wondering if I have to worry about what would happen if I had the SPI bus populated with other devices, and then I tried the bootloader method to program it. Wouldn't the programmer device need to be the SPI master in order to start communications with the uC as a slave?