|
From: openocd-gerrit <ope...@us...> - 2025-11-02 13:40:28
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 914b8557802bf4e59b2a437fd8b6a015e9c0d773 (commit)
from 165e578d2b07408ec08ead21c9c531267f61315a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 914b8557802bf4e59b2a437fd8b6a015e9c0d773
Author: Jonathan Steinert <ha...@ku...>
Date: Tue Oct 14 09:06:33 2025 -0700
xmc4xxx: Correct some flash sector layouts
I think this may have been a typo/thinko from first implementation, but
for the 4200 the layout is 8 16KB chunks and then 1 128KB chunk. We were
previously only writing 240KB
Signed-off-by: Jonathan Steinert <ha...@ku...>
Change-Id: Ic3cff75ba21f6bc6ac440dfb30e24c328c7cd47c
Reviewed-on: https://review.openocd.org/c/openocd/+/9172
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Karl Palsson <ka...@tw...>
Tested-by: jenkins
diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c
index 54fd5a586..bf41cc7eb 100644
--- a/src/flash/nor/xmc4xxx.c
+++ b/src/flash/nor/xmc4xxx.c
@@ -231,12 +231,12 @@ struct xmc4xxx_command_seq {
};
/* Sector capacities. See section 8 of xmc4x00_rm */
-static const unsigned int sector_capacity_8[8] = {
- 16, 16, 16, 16, 16, 16, 16, 128
+static const unsigned int sector_capacity_9[9] = {
+ 16, 16, 16, 16, 16, 16, 16, 16, 128
};
-static const unsigned int sector_capacity_9[9] = {
- 16, 16, 16, 16, 16, 16, 16, 128, 256
+static const unsigned int sector_capacity_10[10] = {
+ 16, 16, 16, 16, 16, 16, 16, 16, 128, 256
};
static const unsigned int sector_capacity_12[12] = {
@@ -272,12 +272,12 @@ static int xmc4xxx_load_bank_layout(struct flash_bank *bank)
LOG_DEBUG("%u sectors", bank->num_sectors);
switch (bank->num_sectors) {
- case 8:
- capacity = sector_capacity_8;
- break;
case 9:
capacity = sector_capacity_9;
break;
+ case 10:
+ capacity = sector_capacity_10;
+ break;
case 12:
capacity = sector_capacity_12;
break;
@@ -361,11 +361,11 @@ static int xmc4xxx_probe(struct flash_bank *bank)
* we understand the type of controller we're dealing with */
switch (flash_id) {
case FLASH_ID_XMC4100_4200:
- bank->num_sectors = 8;
+ bank->num_sectors = 9;
LOG_DEBUG("XMC4xxx: XMC4100/4200 detected.");
break;
case FLASH_ID_XMC4400:
- bank->num_sectors = 9;
+ bank->num_sectors = 10;
LOG_DEBUG("XMC4xxx: XMC4400 detected.");
break;
case FLASH_ID_XMC4500:
-----------------------------------------------------------------------
Summary of changes:
src/flash/nor/xmc4xxx.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|