EWP flash command problems

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Location: Auckland, New Zealand
Posts: 14
Joined: Mon Jun 04, 2007 6:57 pm

EWP flash command problems

Sun Aug 17, 2014 1:29 am

I was wondering if anyone else has successfully used the EWP (erase and write page) command on the EEFC (enhanced flash controller). All my attempts on the sam4e8e proved to be unsuccessful and it seemed as if the EWP command simply did nothing at all. Eventually I changed my design to erase first and then program, which works.

It is possible that the page being written was only partially filled and so now I am wondering if EWP only supports full page programming. In a partially filled page I would have expected the page to be erased (so all bits are 1) and then just the specified bytes to be programmed. However whether or not EWP is restricted to full page programming is not stated in the datasheet but then the datasheet's description of the FARG parameter for the EPA (erase pages) command is completely wrong or at least very misleading, so no surprises there. I notice that the Atmel Software Framework does not make use of the EWP command in its implementation of nvm_write and nvm_write_char but instead uses EPA and then WP so perhaps EWP didn't really work out when that was written?

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest