To All,
I am refering to LM3S9B96 device.
The following sections are copied from two different version of the LM3S9B96 data sheet.
From manual: Stellaris® LM3S9B96 Microcontroller DATA SHEET January 14, 2011
6.2.3.6 Nonvolatile Register ProgrammingThis section discusses how to update registers that are resident within the Flash memory itself.These registers exist in a separate space from the main Flash memory array and are not affectedby an ERASE or MASS ERASE operation. The bits in these registers can be changed from 1 to 0with a write operation. The register contents are unaffected by any reset condition except power-onreset, which returns the register contents to 0xFFFF.FFFF. By committing the register values usingthe COMT bit in the FMC register, the register contents become nonvolatile and are therefore retainedfollowing power cycling. Once the register contents are committed, the only way to restore the factorydefault values is to perform the sequence described in “Recovering a "Locked"Microcontroller” on page 192.
From manual: Stellaris® LM3S9B96 Microcontroller DATA SHEET January 20, 20126.2.3.6 Non-Volatile Register ProgrammingThis section discusses how to update the registers shown in Table 6-2 on page 315 that are residentwithin the Flash memory itself. These registers exist in a separate space from the main Flash memoryarray and are not affected by an ERASE or MASS ERASE operation. With the exception of the BootConfiguration (BOOTCFG) register, the settings in these registers can be written, their functionsverified, and their values read back before they are committed, at which point they becomenon-volatile. If a value in one of these registers has not been committed, any type of reset restoresthe last committed value or the default value if the register has never been committed. Once theregister contents are committed, the only way to restore the factory default values is to perform thesequence described in “Recovering a "Locked" Microcontroller” on page 193.To write to a non-volatile register:■ Bits can only be changed from 1 to 0.
Page 335Register 15: User Register 0 (USER_REG0), offset 0x1E0Note: Offset is relative to System Control base address of 0x400FE000.This register provides 31 bits of user-defined data that is non-volatile and can only be committedonce. Bit 31 indicates that the register is available to be committed and is controlled through hardwareto ensure that the register is only committed once. Prior to being committed, bits can only be changedfrom 1 to 0. The reset value shown only applies to power-on reset; any other type of reset does notaffect this register. The write-once characteristics of this register are useful for keeping staticinformation like communication addresses that need to be unique per part and would otherwiserequire an external EEPROM or other non-volatile device. Once committed, the only way to restorethe factory default value of this register is to perform the sequence detailed in “Recovering a "Locked"Microcontroller” on page 193.
User Register 0 (USER_REG0)Base 0x400F.E000Offset 0x1E0Type R/W, reset 0xFFFF.FFFF
Register 16: User Register 1 (USER_REG1), offset 0x1E4Note: Offset is relative to System Control base address of 0x400FE000.This register provides 31 bits of user-defined data that is non-volatile and can only be written once.Bit 31 indicates that the register is available to be written and is controlled through hardware toensure that the register is only written once. The write-once characteristics of this register are usefulfor keeping static information like communication addresses that need to be unique per part andwould otherwise require an external EEPROM or other non-volatile device.
User Register 1 (USER_REG1)Base 0x400F.E000Offset 0x1E4Type R/W, reset 0xFFFF.FFFF
The documentation on USER_REG0 indicates that The reset value shown only applies to power-on reset; any other type of reset does notaffect this register.
The USER_REG1 does not have the note that reset values applies only to power on reset.
My testing shows that on push button reset, power on reset and soft reset the register are set to value of 0xFFFF.FFFF.
Q.1 Is there a typo in the manual on what reset the USER_REG0 and USER_REG1 are set to value of 0xFFFF.FFFF?
My testing indicates that USER_REG0 and USER_REG1 value can be set to any value affter their content is 0xFFFF.FFFF. But once the content is set the follwoing comment seems to be valid "Prior to being committed, bits can only be changed from 1 to 0."
Q,2 can you confirm this?
Thanks.
With Best Regards,
Al Modi
Q.2
Al Modi,
Thank you for your detailed post.
To answer your questions:
Q1: Yes this does appear to be an omission in the datasheet as the USER_REGs should operate according to the description given for USER_REG0.
Q2: Yes.
-Dave
I am little confused with your response above to Q.1. Your response indicates yes, means there is a Typo and The USER_REGs would be set to 0xFFFF FFFF with power on rest, hard reset and soft reset. but the 2nd part of your resposne indicates that it should operate according to the description given for USER_REG0. The description given for USER_REG0 in the latest data sheet I have indicates that only Power on reset will set it to 0xFFFF FFFF and no other reset should set it to 0xFFFF FFFF. I am seeing the behavior as indicated above that all reset causes the USER_REGs to be set to 0xFFFF FFFF. I am writing a code based on my test result that all reset type will cause USER_REGs to be set to 0xFFFF FFFF.
Q.3 Am I going to get supriise and in fututre this behavior may not occur?
Please confirm that the manula will be corrected and the behavior I have seen is the way USER_REGs would operate. Thanks.
There was a change on rev C in which all resets act the same (POR). This is what errata "2.3 Debug interface is reset by any type of reset" refers to however the erratum was not inclusive.
Therefore, the description given for USER_REG0 in the latest data sheet you have indicates that only Power on reset will set it to 0xFFFF FFFF, which is true because all resets will look like a POR.