summaryrefslogtreecommitdiff
path: root/extra/lightbar/main.c
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-09-10 21:52:16 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-11 20:00:15 +0000
commitdf66ef06c066e28559260c8efc7b92dfe48c7e41 (patch)
tree1b66b766e33a01a1e0f17a1b79a1f2a72e2e8eb8 /extra/lightbar/main.c
parentf5b7b3242349aeabe55779541f34133681a96193 (diff)
downloadchrome-ec-df66ef06c066e28559260c8efc7b92dfe48c7e41.tar.gz
stm32f07: change erase page size to 2kB
Change erase page size from 1kB to 2kB. The datasheet specifies that the page size is 2kB. This was causing occasional failures in flashrom because flashrom only erases and writes pages where the flash contents don't match the new binary. BUG=none BRANCH=factory-ryu-6212.B TEST=Load onto samus_pd, and verify that flashrom works successfully. Also added console debugging to verify that the actual erase page size is 2kB. I left the CONFIG_FLASH_ERASE_SIZE at 1024 and added the following code. static int command_flash_is_erased(int argc, char **argv) { int offset = -1; int size = CONFIG_FLASH_ERASE_SIZE; int rv; rv = parse_offset_size(argc, argv, 1, &offset, &size); if (rv) return rv; ccprintf("Offset %d, size %d, is erased: %d\n", offset, size, flash_is_erased(offset, size)); return EC_SUCCESS; } DECLARE_CONSOLE_COMMAND(flashiserased, command_flash_is_erased, "", "", NULL); Then: > flashiserased 2048 Offset 2048, size 1024, is erased: 0 > flashiserased 3072 Offset 3072, size 1024, is erased: 0 > flashiserased 4096 Offset 4096, size 1024, is erased: 0 > flasherase 2048 Erasing 1024 bytes at 0x800... > flashiserased 2048 Offset 2048, size 1024, is erased: 1 > flashiserased 3072 Offset 3072, size 1024, is erased: 1 > flashiserased 4096 Offset 4096, size 1024, is erased: 0 You can see when it tries to erase 1kB at 2048, it actually erases 2kB. Change-Id: I02772d4671784930765df63fa99968a07b15882e Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/217475 Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'extra/lightbar/main.c')
0 files changed, 0 insertions, 0 deletions