]> git.sur5r.net Git - openocd/commit
flash: fix sam3 page read/write address computation error
authorChuen Chou <zhouquan27@gmail.com>
Sun, 2 Sep 2012 07:45:15 +0000 (00:45 -0700)
committerFreddie Chopin <freddie.chopin@gmail.com>
Fri, 7 Sep 2012 06:16:57 +0000 (06:16 +0000)
commite26ddb627ba035ab9bfc9c54a5585865a6c89132
tree0fab34124253a89abe27f3f0a6e33dc206590fb6
parent8a197f0bbce93baf7100e99461b58a5d03d8b50c
flash: fix sam3 page read/write address computation error

In at91sam3.c for Atmel SAM3 flash support, there are arithmetic errors in the functions sam3_page_read() and sam3_page_write().
Address locations are computed incorrectly due to an extra addition operation. This leads to memory locations being skipped during
flash writes and reads.

Smaller programs are written successfully into flash, with memory gaps, while larger programs of legitimate size fail because the
skipped memory is not utilized and therefore unavailable.

The changes address this condition, and have been tested with an Atmel SAM3X-EK evaluation board.

Change-Id: I9ea3b9ed0130b71cbc32b2294e31a6a2bc71b47a
Signed-off-by: Chuen Chou <zhouquan27@gmail.com>
Reviewed-on: http://openocd.zylin.com/806
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/flash/nor/at91sam3.c