The bank x internal buffer control bit (PGx) needs to be set to enable
write operations before flashing an H7x part. The stm32x_write function
does this in its "standard programming" fallback loop and a branch for
handling remaining bytes, but never sets PGx prior to calling
stm32x_write_block. For some reason, the existing code still succeeds on
rev Y silicon, but fails on rev V parts.
This commit sets the PGx bit prior to calling stm32x_write_block.
The bank x internal buffer control bit (PGx) needs to be set to enable write operations before flashing an H7x part. The stm32x_write function does this in its "standard programming" fallback loop and a branch for handling remaining bytes, but never sets PGx prior to calling stm32x_write_block. For some reason, the existing code still succeeds on rev Y silicon, but fails on rev V parts.
This commit sets the PGx bit prior to calling stm32x_write_block.