Daniel White

MC9S12XDT256 write once registers

Discussion created by Daniel White on Sep 9, 2008
Latest reply on Sep 10, 2008 by Jim Donelson
I was just burned by a "write once" register (FCLKDIV). I remember reading about others here who have been burned by these in the past. I have a few related questions about these.
 
Does anyone have a complete list of these registers for my CPU or family?
 
Here is the list I have come up with:
 

PLLCTL – SCME bit

COPCTL

TSCR1 – PRNT bit

ICSYS

CANxCTL1 – CANE bit

MODE

MMCCTL1

DIRECT

IRQCR

ECLKDIV

FCLKDIV

CLKSEL

 
 
Is a search of the data sheet for "write once" sufficient to find all cases?
 
When a register description says that just one bit is write once and not the whole register, how is that possible? Does this mean that you can use BCLR and BSET on the other bits and it won't count towards the one time write? Or does this mean you can only change it from 0 to 1 once? In the specific case of the PRNT bit in the TSCR1 register, what happens if I write 0x80 to that register? Can I not set the PRNT bit later? Does it depend on the opcode chosen by the compiler?
 
 
Any insights will be greatly appreciated and helpful to everyone here.

Outcomes