From b0ec57cfec195e22f7b37d59f18d8ebefde0c99c Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 21 Sep 2006 09:48:49 +0000 Subject: add some debugging output to flash_page() git-svn-id: https://svn.openpcd.org:2342/trunk@212 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/src/dfu/flash.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'firmware/src') diff --git a/firmware/src/dfu/flash.c b/firmware/src/dfu/flash.c index 8806bae..1a40627 100644 --- a/firmware/src/dfu/flash.c +++ b/firmware/src/dfu/flash.c @@ -1,6 +1,7 @@ #include #include #include +#include #define EFCS_CMD_WRITE_PAGE 0x01 #define EFCS_CMD_SET_LOCK_BIT 0x02 @@ -38,10 +39,14 @@ static void unlock_page(u_int16_t page) void flash_page(u_int8_t *addr) { u_int16_t page = page_from_ramaddr(addr); + DEBUGP("flash_page(0x%x=%u) ", addr, page); - if (is_page_locked(page)) + if (is_page_locked(page)) { + DEBUGP("unlocking "); unlock_page(page); + } + DEBUGP("performing start_prog "); AT91F_MC_EFC_PerformCmd(AT91C_BASE_MC, AT91C_MC_FCMD_START_PROG | AT91C_MC_CORRECT_KEY | page); } -- cgit v1.2.3