Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

flash/nor/stm32h7x: fix flash write enable bug. #43

Conversation

theNth
Copy link

@theNth theNth commented Sep 24, 2019

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.
@theNth
Copy link
Author

theNth commented Sep 24, 2019

The corresponding issue may be found here:
#42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants