On Thu, Apr 12, 2012 at 4:13 AM, Alexander Krause <[email protected]> wrote:
> I use the first two bytes of the usersig for some kind of serial-id for > each Xmega device. While not a direct answer to your question. XMega chips already have unique serial numbers for each chip. If you could use that it, it might save you production programing issues like these. Example of how to read the serial number may be found here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=82824 > The programming works perfectly when writing the usersig the first time. > Now i tried to change it and it reverts to 0x00,0x00 and I can't change > the two bytes anymore. Note this comment from the above URL: (void) SP_ReadCalibrationByte( offsetof( NVM_PROD_SIGNATURES_t, LOTNUM0 ) ); /* First read after reset or possibly Power Up returns zero, so read then toss this value */ I reported that issue to Atmel when the parts first came out. They said they could not reproduce it. A few others have seen the same thing over the years. So try reading your USER_SIG value twice, see if you get what you expect on the second try. All reads after the very first one, after a reset, work just fine. _______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
