When Config Changes Take Effect
Posted: Thu Sep 03, 2015 3:55 am
I know that on a PIC18F47J53, the alteration of configuration settings by a program is possible just as it is possible on apparently all PIC18 series chips. I also know that the configuration register system works differently in that family of MCUs from many of the other PIC18 chips.
In the PIC18F47J53 family, the last 4 words of Flash program memory are reserved as the FCW (Flash Configuration Words). A running program can alter these Flash words just as it can alter any of the words of Flash memory. Each time the chip is reset, the chip reads these 4 words and transfers their contents to the true configuration registers that are controlling the behavior of the chip. These true configuration registers are actually volatile memory cells. The volatile configuration memory cells are not directly writable but they are readable by a program.
One result of this organization is that making a change to the configuration data in the 4 Flash Configuration Words at the top of Flash memory has no effect on the behavior of the chip until the chip experiences a reset cycle. This is clearly described in the data sheet for the PIC18F47J53 chip family.
However, as I read the data sheets for some of the other PIC18 series chips which do not have this organization (where the configuration is copied to the true configuration registers upon reset) I am left unclear as to when a change written to the configuration registers actually affects the behavior of those chips. For example, I am currently using a PIC18F4620 and I don't seem to see where it says changing the configuration registers causes an effect immediately or not until the next reset cycle.
Does anyone here know for certain how the chips similar to the PIC18F4620 work in this regard?
In the PIC18F47J53 family, the last 4 words of Flash program memory are reserved as the FCW (Flash Configuration Words). A running program can alter these Flash words just as it can alter any of the words of Flash memory. Each time the chip is reset, the chip reads these 4 words and transfers their contents to the true configuration registers that are controlling the behavior of the chip. These true configuration registers are actually volatile memory cells. The volatile configuration memory cells are not directly writable but they are readable by a program.
One result of this organization is that making a change to the configuration data in the 4 Flash Configuration Words at the top of Flash memory has no effect on the behavior of the chip until the chip experiences a reset cycle. This is clearly described in the data sheet for the PIC18F47J53 chip family.
However, as I read the data sheets for some of the other PIC18 series chips which do not have this organization (where the configuration is copied to the true configuration registers upon reset) I am left unclear as to when a change written to the configuration registers actually affects the behavior of those chips. For example, I am currently using a PIC18F4620 and I don't seem to see where it says changing the configuration registers causes an effect immediately or not until the next reset cycle.
Does anyone here know for certain how the chips similar to the PIC18F4620 work in this regard?