cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader issue 'F469 - cannot connect via UART after disabling Readout Protection

ChrisJC
Associate II

Dear All,

 I am having difficulty with the Bootloader on an STM32469.

It is on a custom PCB (which works fine in all other respects), and I can use the SWD interface via J-Link perfectly OK (with both STM32CubeIDE and STM32CubeProgrammer).

My starting point is a board where the Readout Protection was set to Level 1. Note that this is true for all hardware I have access to, so I cannot try with a board that has never had Readout Protection applied.

I can reset the Readout Protection to Level 0 (0xAA) via J-Link. This erases Flash (expected behaviour).

I can check the FLASH peripheral registers via STM32CubeProg, and they all look OK.

ChrisJC_0-1738144737997.png

I would now expect to be able to connect via UART with STM32CubeProgrammer.

However, when I reset my board with BOOT0 set high, and attempt to connect via UART, I get this:

ChrisJC_1-1738144829298.png

I also get four popup error boxes:

1. Initialising the Option Bytes failed

2. Uploading Option Bytes bank 0 failed

3. READ command not acknowledged at address: 0x1fffc000

4. READ command not acknowledged at address: 0x1fffx008

You can see from the above dump that the Bootloader is operational and connected, but is not responding correctly.

I have verified this process on a NUCLEO-F401RE board to check my expectations are correct, and everything works as expected.

Please help.


Thanks,


Chris.

 

 

 

4 REPLIES 4
Imen.D
ST Employee

Hello @ChrisJC 

Check your boot mode configuration and boot pin connection following the AN4488 Application note, in section "Boot mode selection" and "Boot pin connection". 

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi Imen,

 Thank you for your reply.

As far as I know, I have configured boot mode selection correctly:

I have grounded BOOT1:

ChrisJC_0-1738571605347.png

BOOT0 is connected to an external interface:

ChrisJC_1-1738571678587.png

And to enter the Bootloader, I simply apply 3.3V to BOOT0 and reset the target.

I know it must be in Bootloader mode because you can see it correctly in the STM32CubeProg trace above as Chip ID: 0x434 which I believe has been read from the target?

My theory is that the Bootloader incorrectly believes the Readout Protection to be active?

What do you think?

Thank you.

Chris. 

ChrisJC
Associate II

OK, so I just tried it on a brand new PCB, brand new STM32. Never been programmed, so factory fresh:

ChrisJC_0-1738684724092.png

Exactly the same problem - the bootloader is rejecting the GetID with a NACK...

Chris.

 

ChrisJC
Associate II

Replying to my own topic!

I think I know what is going on here:

I analysed the serial comms, and there was an additional 0x7f at the start. So the sequence was

PC->Target = 0x7f

Target->PC = 0x79 ACK

PC->Target = 0x7f - THIS IS SPURIOUS

Target->PC = 0x1f NACK

After this, it all falls over. There are also some badly framed bytes being sent by the PC.

I checked with an Nucleo-F429 that I had lying around, which worked correctly.

I checked logic levels and signal integrity with the oscilloscope, everything looked perfect.

Eventually I switched the USB-RS232 converter from an MCP2200 (Microchip) to a CP2101 (SiLabs), and everything seems to be working (as far as I have tested it - it's getting late!). I can connect, maintain a connection, perform a mass erase and download an image.

So it seems there's some weird incompatibility between Windows 11, the MCP2200 driver and STM32CubeProg.

Note I have been using the MCP2200 for normal serial comms with no issues at all, so it's probably an STM32CubeProg / Java bug.

I'll test the Readout Protection in due course.


Chris.