diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2016-10-04 09:38:21 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2016-10-04 10:30:44 +0100 |
commit | 56e60b0982b5f7fc00e3ca8c43887f2221d7ad76 (patch) | |
tree | 1b6de16c451656fc7a43e9e16df59b2cc4bb31ec | |
parent | 81631e49a608be93af0a473ec3f099cb556a2c8a (diff) |
stm32l4x: fix incorrect device id mask
Change-Id: I37cf9cbdd07dc3764d2c719b7c6ed5852aea3943
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/3799
Tested-by: jenkins
-rw-r--r-- | src/flash/nor/stm32l4x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c index 129b281e..7a75c523 100644 --- a/src/flash/nor/stm32l4x.c +++ b/src/flash/nor/stm32l4x.c @@ -698,7 +698,7 @@ static int get_stm32l4_info(struct flash_bank *bank, char *buf, int buf_size) if (retval != ERROR_OK) return retval; - uint16_t device_id = dbgmcu_idcode & 0xffff; + uint16_t device_id = dbgmcu_idcode & 0xfff; uint8_t rev_id = dbgmcu_idcode >> 28; uint8_t rev_minor = 0; int i; @@ -713,7 +713,7 @@ static int get_stm32l4_info(struct flash_bank *bank, char *buf, int buf_size) const char *device_str; switch (device_id) { - case 0x6415: + case 0x415: device_str = "STM32L4xx"; break; |