STM32L151 setting RDP=1 prevents update via user bootloader (Boot From Flash)
I have a user bootloader I have used across various STM32 parts over 12 years. In production RDP level 1 is enabled and this has always been fine for various STM32F1, F2, F4 based products we have in production, and for thousands of units in the field. However on a new product using an STM32L151C8T6A, setting RDP prevents update via this bootloader.
The bootloader uses XMODEM-1K over UART - the target emits the "C" start character and starts the update of the application area if the host responds to the start character before a timeout. With RDP=0, this process works as expected. With RDP=1, the first XMODEM-1K packet is sent in response to the "C" start byte, but it is ignored (i.e. no ACK, NAK or CAN) and the existing unmodified application boots. I do not believe that the processor is resetting, because that would cause the "C" to be emitted again, rather it seems to be ignoring the XMODEM-1K packet, and booting after timeout.
There is no JTAG/SWD connection, and nothing connected on-board to the debug port pins. Nothing in the documentation suggests to me that this should not work, and as I have said, I have been using this bootloader method over many products using STM32 variants for over 12 years.
Below is an example (from Advanced Serial Port Monitor in "Spy" mode) of the first packet being ACK'ed (white 06) when RDP=0, and the next packet following on:
and here, the same packet being ignored when RDP=1:
The target output (white) is junk because the application outputs at 38400 where the bootloader runs at 115200, but it indicates that the application is being started by the bootloader without resetting (which would emit 'C' / 0x43 at 115200). These images are not necessarily helpful in diagnosing the issue, but are provided to indicate the differing behaviour is real not imagined ;)
BOOT pin configuration:

Any ideas welcome - is there something different about the L1xx that would cause this to differ from other parts? (I have already encountered and dealt with the erase to 0x00 rather than 0xFF, "gotcha" so I am wary that there may be other differences I have not considered.
