Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
openocd
Commits
d90480d3
Commit
d90480d3
authored
Feb 19, 2019
by
Kevin Gillespie
Committed by
Kevin
Apr 17, 2019
Browse files
Fixing alignment issue with flash algorithm.
Change-Id: Ie3be47c4db541403b1d9215da3dd2d41bae1c462
parent
8817de52
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/flash/nor/max32xxx.c
View file @
d90480d3
...
...
@@ -509,11 +509,12 @@ static int max32xxx_write(struct flash_bank *bank, const uint8_t *buffer,
return
retval
;
}
if
(
remaining
>=
4
)
{
if
(
remaining
>=
16
)
{
/* try using a block write */
/* 128-bit align the words_remaining */
words_remaining
=
remaining
/
4
;
words_remaining
=
remaining
/
16
;
words_remaining
*=
4
;
/* Algorithm will pad with 0xFF */
// words_remaining -= words_remaining % 4;
...
...
@@ -643,6 +644,7 @@ static int max32xxx_write(struct flash_bank *bank, const uint8_t *buffer,
return
ERROR_FAIL
;
}
target_read_u32
(
target
,
info
->
flc_base
+
FLC_CN
,
&
flash_cn
);
flash_cn
&=
~
(
FLC_CN_32BIT
);
target_write_u32
(
target
,
info
->
flc_base
+
FLC_CN
,
flash_cn
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment