At91EfcRegionUnlock et al lockup

"Coleman Brumley" <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.ethernut
Organization PolarSoft, Inc.
Message-ID <[email protected]>
Hello.

I've come across a peculiar issue with
At91EfcRegionUnlock/At91EfcRegionLock/At91EfcSectorWrite on the
AT91SAM7X256.

When my board is "fresh" out of flash from SAM-BA, I'm able to use the
At91Efc functions to write a new firmware image to flash. However, once that
process is complete, that same process will freeze upon either a call to
At91EfcRegionUnlock or At91EfcSectorWrite. It seems as if the EFC is locked
out completely. 

Here is the code I'm using. IMAGE_OFFSET is 0x00, and offset and pos are
calculated accordingly. 

if (At91EfcRegionUnlock(IMAGE_OFFSET + offset + pos) == 0)	{
	rc = At91EfcSectorWrite(IMAGE_OFFSET + offset + pos, &buffer[pos],
size);
	At91EfcRegionLock(IMAGE_OFFSET + offset + pos);
}		

Does anyone have any ideas about what state SAM-BA leaves the EFC in after
it's used to flash the board? And, if so, how can I emulate that in code?

Thanks in advance.

Best Regards,
Coleman  

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.