Need to get an inaccessible STML041 into the embedded bootloader via UART, driven from an STM32L051xx. Need a documentation that describes: 1) getting from my app into bootloader mode via UART, 2) use BL to re-flash the L041 with data from L051.
I'm a newbie to STM products. Lots of experience with other vendors, and am used to seeing example solutions that go from point A to point B. STM seems to provide tool descriptions (and I understand why given the combinations of tools, versions, processors, etc). But I'm stumped pulling it all together.
I have a system design that has an STM32L051xx with I2C to the outside world and it uses UART2 to communicate to an inaccessible STM32L041xx on UART2. The L051 has a command set to talk to the outside world. The 051 tells the 041 what to do via USART2 on both uC's. The SWD and BOOT pins are not accessible (I have 2 long optical wires connecting the 2 UARTS), and no other L041 uC access.
Hardware design changes are not possible due to the nature of the product.
AN2606 section 53 shows L041 UART and SPI info but the block diagram shows only SPI, and notes settings for BOOT pins to get to the bootloader upon reset. I assume the flow chart is valid for USART2 comm too. But I don't see how to get to the bootloader mode from the UART interface only.
AN3155 describes the embedded bootloader command set. Great, but I need to be in the embedded bootloader mode.
How to get from my application into the bootloader mode by using only the UART??? I will create a separate L051 command to run a function across the UART lines, but what are ALL the steps needed to get from the L041 application to a point where I can start up the bootloader, configure it, start transferring the updated application code, run a checksum, receive confirmation, and then execute the new version of flash code?
Nothing I have found so far pulls it all together into an app, and the piecemeal documentation has me very confused. It's like building a bookcase with instructions that say "Here are the set of tools used to make the bookshelf, and how to use each tool".
I've looked at many examples on GITHUB, but they all seem to assume there is a button available to hold the BOOT line.
I find info (not helpful for my case) on a separate info on
- "Open Bootloader"/"OpenBL",
- AN4657 describing the process for non-OpenBL solution
- cryptic info about "X-CUBE-IAP-USART". Creating my own bootloader is not an acceptable option.
STM L0x1 docs say I shouldn't have to.
PLEASE guide me to a place that can help me move forward...My team is blocked until I resolve this! HELP!!!!
