How to activate bootloader is not consistent across documentation for STM32G051K8Tx (I do not know about other processors.)
AN2606 Rev 55 Page 241/432 says "... bootloader is activated by applying Pattern 6... Table 2"
AN2606 page 27/432 Table 2, Pattern 6.
Boot0(pin) = 1, nBoot1(bit) = 1, nBoot0_SW(bit) = 1
Boot0(bit) = 0, nBoot1(bit) = 1, nBoot0_SW(bit) = 0
Other two cases are when Flash memory is empty. I do not care about those cases at the moment, but I am glad they are there.
First issue:
RM0444 Rev 5, Page 81/1390 there is no bit nBoot0_SW. There is also no "BOOT0" bit (There is an nBOOT0 bit)
Second issue: assuming it was a typographical error, and nBoot0_SW is the same as nBoot_SEL it still does not work.
nBoot_SEL is defined on page 82/1390 as
Bit 24 nBOOT_SEL: Boot0 signal source selection
This option defines the source of the BOOT0 signal:
0: BOOT0 pin (Legacy mode)
1: nBOOT0 option bit
There is a Table 8 on page 66&67 of RM0444 that says to boot into system memory (which I assume is the Bootloader, why not use the same names across documents?)
BOOT_LOCK = 0, nBOOT1 = 1, BOOT0 = 1 nBOOT_SEL = 0, nBOOT0 = x
or
BOOT_LOCK = 0, nBOOT1 = 1, BOOT0 = x nBOOT_SEL = 1, nBOOT0 = 0
So the first one is what I need for my case. That is a lot different than Pattern 6.
And Table 8 does not cover the case of the EMPTY bit which was addressed in Pattern 6. It is covered in the Empty check paragraph, but it would be simpler if it were included in Table 8. (And the corrected Pattern 6) .
