[feature] STM32 flash type implementation for WB05, WB06/07, WB09, WL3x #1466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have implemented support for a new flash type, tentatively named
WB0. These devices were originally called BlueNRG, but a year ago ST has renamed them and now markets them under the STM32 brand. Probably because they were not originally intended to integrate into the STM32 ecosystem, they are a bit quirky:0x10040000FLASHperipheral. No unlocking scheme, writing is done by filling data registers and triggering a write command.IDCODEregister, however there is aJTAG_IDregister which has aPART_NUMBERfield. STM32CubeProg uses this as the DeviceID, so I've followed their example:DBGMCUblock to gate watchdogs conditionally when a debugger is attached.I have written a fast flashloader and direct support for byte-granular writes to OTP.
Apparently STM32WL3x also shares this architecture, but for lack of a documented family name, I have stuck to
WB0as theflash_type.Tested only on
STM32WB07CCso far, with STLINK-V3MINIE and the on-boardSTLINK-V3ECon theNUCLEO-WB07CCdev board.References
STM32WB05 (BlueNRG-LPS) RM0491
STM32WB06/07 (BlueNRG-LP) RM0530
STM32WB09 (BlueNRG-LPF) RM0505
STM32WL3x RM0511
ST's OpenOCD implementation: bluenrg-x.c