aboutsummaryrefslogtreecommitdiff
path: root/src/lpc11xx.c
diff options
context:
space:
mode:
authorPavel Burgr2013-12-14 21:25:10 +0100
committerPavel Burgr2014-01-22 10:35:35 +0100
commitce17cc2e2b8b5afe79247dcd96f1fc222fed1dfc (patch)
treeca97f894272ec9c5934d903148b6e8d0c46b4f23 /src/lpc11xx.c
parent8835df1822ed9e99ee593a6ed16bb44cf09e4c57 (diff)
Fix in checksum calculation condition
Diffstat (limited to 'src/lpc11xx.c')
-rw-r--r--src/lpc11xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpc11xx.c b/src/lpc11xx.c
index 9adbe2b..f7d72fa 100644
--- a/src/lpc11xx.c
+++ b/src/lpc11xx.c
@@ -216,7 +216,7 @@ lpc11xx_flash_write(struct target_s *target, uint32_t dest, const uint8_t *src,
chunk_offset = 0;
/* if we are programming the vectors, calculate the magic number */
- if (dest == 0) {
+ if (chunk * IAP_PGM_CHUNKSIZE == 0) {
uint32_t *w = (uint32_t *)(&flash_pgm.data[0]);
uint32_t sum = 0;