forked from auracaster/openocd
flash/bluenrg-x: Support STM32WL33 AKA Spirit3
This device has a flash size up to 256 Kb with page size equal to 2 Kb Change-Id: I2e284e9cd1d5be7df491a2fe2c9d11ce99c81d73 Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9354 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
2389c28ea8
commit
89ded3d2f0
@@ -87,6 +87,16 @@ static const struct flash_ctrl_priv_data flash_priv_data_lpf = {
|
||||
.part_name = "STM32WB09 (BLUENRG-LPF)",
|
||||
};
|
||||
|
||||
static const struct flash_ctrl_priv_data flash_priv_data_spirit3 = {
|
||||
.die_id_reg = 0x40000000,
|
||||
.jtag_idcode_reg = 0x40000004,
|
||||
.flash_base = 0x10040000,
|
||||
.flash_regs_base = 0x40001000,
|
||||
.flash_page_size = 2048,
|
||||
.jtag_idcode = 0x02027041,
|
||||
.part_name = "STM32WL33 (SPIRIT3)",
|
||||
};
|
||||
|
||||
struct bluenrgx_flash_bank {
|
||||
bool probed;
|
||||
uint32_t die_id;
|
||||
@@ -98,7 +108,8 @@ static const struct flash_ctrl_priv_data *flash_ctrl[] = {
|
||||
&flash_priv_data_2,
|
||||
&flash_priv_data_lp,
|
||||
&flash_priv_data_lps,
|
||||
&flash_priv_data_lpf
|
||||
&flash_priv_data_lpf,
|
||||
&flash_priv_data_spirit3
|
||||
};
|
||||
|
||||
/* flash_bank bluenrg-x 0 0 0 0 <target#> */
|
||||
@@ -476,7 +487,8 @@ static int bluenrgx_probe(struct flash_bank *bank)
|
||||
return retval;
|
||||
|
||||
if (idcode != flash_priv_data_lp.jtag_idcode && idcode != flash_priv_data_lps.jtag_idcode
|
||||
&& idcode != flash_priv_data_lpf.jtag_idcode) {
|
||||
&& idcode != flash_priv_data_lpf.jtag_idcode
|
||||
&& idcode != flash_priv_data_spirit3.jtag_idcode) {
|
||||
retval = target_read_u32(bank->target, BLUENRG2_JTAG_REG, &idcode);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user