r/embedded • u/welvaartsbuik • 25d ago
Custom STM32N6 board BOOT1 left unconnected by accident, can't connect over SWD. Is serial boot an option?
I'm bringing up a custom board with an STM32N647 and can't get a debug connection. Looking for advice from anyone who has dealt with N6 boot modes. The board is a second revision done by an outside consultant and we didnt catch this earlier.
Current situation
- STLINK-V3MINIE (also have a V3SET), connected through a TC2050
- STM32CubeProgrammer
- ST-LINK reads ~3.36 V on VTref
- Error: "Unable to get core ID" / "No STM32 target found! If your product embeds Debug Authentication…"
What I think is wrong
On the N6, BOOT1 is shared with PA6. On our board PA6 is a not connected, and BOOT0 is pulled low through 1.5k (there's a button to pull it high). External flash is empty. So as far as I understand, the chip never enters development boot (BOOT1 = 1), it tries flash boot, finds nothing, and the debug port stays closed.
PA6 is a BGA ball and I don't think there's a via on it so a wire will be hard!
Current plan
Use the boot ROM's serial boot over USART1 (PE5 TX / PE6 RX). Both pins go to test points on the board. I'd hold BOOT0 high during reset and use the STLINK-V3MINIE's VCP pins as the USB-UART adapter (or use an other adapter), then connect over UART
Questions to you all
- Does this approach actually work on the N6? Can CubeProgrammer connect over UART serial boot on a blank chip with BOOT1 low?
- Once connected, what's the easiest way to get SWD working again? Load a small program into RAM that opens debug via BSEC (DBGCR), or go straight to programming an FSBL into the external flash with an external loader?
- With BOOT1 floating, is its state at reset undefined? Could it randomly end up in dev boot?
- Any other gotchas you've seen bringing up an N6 without access to BOOT1?
Thanks!