NXP® SemiconductorsMSE9S12XHZ512_1M80F
Mask Set ErrataRev. April 17, 2012



MC9S12XHZ512, Mask 1M80F


Introduction
This errata sheet applies to the following devices:

MC9S12XHZ512



MCU Device Mask Set Identification

The mask set is identified by a 5-character code consisting of a version number, a letter, two numerical digits, and a letter, for example 1K79X. All standard devices are marked with a mask set number and a date code.



MCU Device Date Codes

Device markings indicate the week of manufacture and the mask set used. The date is coded as four numerical digits where the first two digits indicate the year and the last two digits indicate the work week. For instance, the date code "0201" indicates the first week of the year 2002.



MCU Device Part Number Prefixes

Some MCU samples and devices are marked with an SC, PC, or XC prefix. An SC prefix denotes special/custom device. A PC prefix indicates a prototype device which has undergone basic testing only. An XC prefix denotes that the device is tested but is not fully characterized or qualified over the full range of normal manufacturing process variations. After full characterization and qualification, devices will be marked with the MC or SC prefix.



Errata System Tracking Numbers

MUCtsXXXXX is the tracking number for device errata. It can be used with the mask set and date code to identify a specific erratum.



Errata Summary


Errata NumberModule affectedBrief DescriptionWork-
around
MUCts03390 atd_10b16c ATD: Abort of an A/D conversion sequence with write to ATDxCTL0/1/2/3 may not work YES
MUCts03439 iic IIC: 10-bit Slave is misaddressed by the data YES
MUCts03446 iic IIC:10-Bit Slave fails to acknowledge address on a second transfer YES
MUCts03447 iic IIC:10-bit Master addresses itself by a faulty acknowledge NO
MUCts03449 iic IIC: 10-bit Slave does not acknowledge address if the last data is $XF YES
MUCts03564 mscan MSCAN: Corrupt ID may be sent in early-SOF condition YES
MUCts03641 s12x_dbg DBG in Pure PC mode - too many trace buffer entries generated NO
MUCts03642 s12x_dbg DBG No address match if next transaction is misaligned word access YES
MUCts03649 eetx_4k eetx4k An interrupt following immediately after execution of a STOP instruction may disable read access to the EEPROM array YES
MUCts03653 vreg_3v3 vreg_3v3.05.02: Possible incorrect operation if device is wakened from stop mode within 4.7µs of stop mode entry NO
MUCts03689 atd_10b16c ADC: conversion does not start with 2 consecutive writes to ATDCTL5 YES
MUCts03760 s12x_dbg DBG: State flags and counter corrupted by simultaneous arm and disarm YES
MUCts03871 s12x_cpu CPU: Breakpoint missed at simultaneous taghits YES
MUCts03977 pwm_8b8c PWM: Emergency shutdown input can be overruled YES
MUCts04086 pim_9xhz512 PIM: Edge-sensitive mode of IRQ-pin may cause incorrect interrupt vector fetch YES
MUCts04104 ect_16b8c ECT: Channel 0 - 3 Input Capture interrupts inhibited when BUFEN=1, LATQ=0 and NOVWx=1 YES
MUCts04135 pwm_8b8c PWM: Wrong output level after shutdown restart in 16bit concatenated channel mode YES
MUCts04136 pwm_8b8c PWM: Wrong output value after restart from stop or wait mode YES
MUCts04156 ect_16b8c ECT_16B8C: Output compare pulse is inaccurate YES
MUCts04166 ftx_512k4 Flash: Burst programming issue if bus clock frequency is higher than oscillator clock frequency YES
MUCts04238 ftx_512k4 FTX: Flash Command influenced by Backdoor Key write YES
MUCts04244 sci SCI: RXEDGIF occurs more times than expected in IR mode YES



ATD: Abort of an A/D conversion sequence with write to ATDxCTL0/1/2/3 may not workMUCts03390

Description

Starting a conversion with a write to ATDxCTL5 or on an external trigger

event, and aborting immediately afterwards with a write to ATDxCTL0,
ATDCTL1, ATDxCTL2 or ATDxCTL3 can fail to stop the conversion process.

Workaround


Only write to ATDxCTL4 to abort an ongoing conversion sequence.


Use the recommended start and abort procedures from the Block Guide.
Section : Initialization/Application Information
Subsection: Setting up and starting an A/D conversion
Subsection: Aborting an A/D conversion



IIC: 10-bit Slave is misaddressed by the dataMUCts03439

Description

10-bit Master-Transmitter, Slave-Receiver transfer - The Slave fails 

to acknowledge if the first data byte is the equivalent of the third
address byte in a Master-Receiver, Slave-Transmitter transfer.

Example:
Where the slave address is 0x2AA and the first data byte value is
0xF5.

The first address byte is 0xF4 and the second is 0xAA. If the master
sends 0xF5 as the first data byte (which is the same as the first byte
except the last R/W bit) the slave is misaddressed and does not
acknowledge the following data transfer.

This will cause communications failure.


Workaround


Avoid using a first data byte value that is the same as the third 

address byte. Where possible use dummy data for the first byte which
does not match the address byte.



IIC:10-Bit Slave fails to acknowledge address on a second transferMUCts03446

Description

10-bit Master-Receiver, Slave-Transmitter transfer - When a part is 

configured as a slave it fails to acknowledge the second byte of the
extended address on the second attempt of a Master-Receiver addressing
a Slave-Transmitter. The first transfer will be successful but the
second will fail.

This will cause communications failure.



Workaround


When configuring the IIC as a Receiver (Tx/Rx = 0), first disable the 

IIC (IBEN = 0), re-enable it (IBEN = 1) and then clear the Tx/Rx bit.



IIC:10-bit Master addresses itself by a faulty acknowledgeMUCts03447

Description

10-bit Master-Transmitter, Slave-Receiver transfer - The Master does 

not release SDA when waiting for the Slave to acknowledge if the
Master's address = 0x1XX.

Example:
Address of the master is $1AA and the address of the slave is $155. As
the first address byte is $F2, the master and the slave both
acknowledge.

This will cause communications failure.


Workaround


None. 




IIC: 10-bit Slave does not acknowledge address if the last data is $XFMUCts03449

Description

10-Bit Master-Receiver, Slave-Transmitter transfer - The Slave fails 

to acknowledge the address if the last data byte in a previous
transfer was 0xXF.

Example:
First initiate a Master Tx Slave Rx operation

Start
0xF0+AD10+AD9+R/W=0 (First Address byte = 0xF2)
Acknowledge
AD8:1 (Second Address byte = 0x78)
Acknowledge
Data1 (0x01)
Acknowledge
Data2 (0x0F)
Acknowledge
Stop

Secondly initiate a Master Rx Slave Tx operation

Start
0xF0+AD10+AD9+R/W=0 (First Address byte = 0xF2)
Acknowledge
AD8:1 (Second Address byte = 0x78)
NO ACKNOWLEDGE ¡­¡­. Fault condition

This will cause communications failure.


Workaround


Avoid using last data bytes in transfers in the range 0xXF; where 

possible add a dummy data byte.




MSCAN: Corrupt ID may be sent in early-SOF conditionMUCts03564

Description

The initial eight ID bits will be corrupted if a message is set up for

transmission during the third bit of INTERMISSION and a dominant bit is
sampled leading to an early-SOF*.

The CRC is calculated from the resulting bit stream so that the
receiving nodes will still validate the message.

An early-SOF condition may only occur if the oscillators in the network
operate at a tolerance range which could lead to a cumulated phase error
after 11 bit times larger than phase segment 2.

In case arbitration is lost during transmission of the corrupt
identifier, a non-corrupted ID will be sent with the next attempt if the
transmit request remains active.

*The CAN protocol condition referred to as 'early-SOF' in this erratum
is detailed in "Bosch CAN Specification Version 2.0" Part A, section 9,
and a Note to section 3.2.5 INTERFRAME SPACING – INTERMISSION in Part B.

Workaround


Due to increased oscillator tolerance a transmission start in the third

bit of intermission is possible and allowed. The errata can be avoided
when calculating the maximum oscillator tolerance of the overall CAN
system. The phase error after 11 bit times due to the oscillator
tolerance should be smaller than phase segment 2.

If an early-SOF cannot be avoided the following methods will provide
prevention:

- Assigning the same value to all upper eight ID bits in the network
- Allocating dedicated data length codes (DLC) to every identifier used
in the network and checking for correspondence after reception
- Assigning only IDs (x) which do not consist of a combination of other
assigned IDs (y,z) and using the acceptance filters to reject
erroneous messages, i.e.
- for standard frames: IDx[11:0] != {IDy[11:3], IDz[2:0]}
- for extended frames: IDx[28:21] != {IDy[28:21],IDz[20:0]}



DBG in Pure PC mode - too many trace buffer entries generatedMUCts03641

Description

If configured for Pure PC mode tracing, an extra, unexpected trace

buffer entry may be encountered, by one of the two following scenarios.

1) At a tagged breakpoint to the CPU, the trace buffer stores the opcode
address of the tagged instruction although it is not executed.

2) When a BACKGROUND command forces BDM, the address of the first opcode
following BDM is stored to the trace buffer befored entering BDM.

In both cases, the extra trace buffer entry is of the first opcode
address following the breakpoint routine. Thus, if tracing is not
terminated in the breakpoint routine, the same entry appears twice
in the trace buffer.
If tracing is terminated in the breakpoint routine, the last trace
buffer entry is incorrect, since it points to the next instruction,
which has not yet been executed.



Workaround


None. 




DBG No address match if next transaction is misaligned word accessMUCts03642

Description

Memory accesses in successive bus cycles must both be able to generate

forced triggers if both accesses match.

If accesses occur in successive cycles whereby the second access is a
misaligned word access, then a comparator match is lost. This could
cause a forced breakpoint to be missed if the state sequencer is
dependent on both the successive matches to reach final state.
Example...
LDX #WORD_MISALIGNED
STD 0,X ; First access M0->State2
LDD WORD_MISALIGNED ; Second access M0->Final State

If the STD last bus cycle is a write and the LDD first bus cycle is a
read then only one state sequencer transition occurs.

In range modes, this can occur when 2 different addresses within/outside
the specified range are accessed in successive bus cycles, otherwise it
can only happen if the same address is written and then read in
successive bus cycles.

Workaround


Insert a NOP instruction before misaligned word accesses if they can 

follow accesses to the predefined comparator range.


LDX #WORD_MISALIGNED-1
STD 0,X ; First access in range M0->State2
NOP ; NOP insertion
LDD WORD_MISALIGNED ; Second access in range M0->Final
State




eetx4k An interrupt following immediately after execution of a STOP instruction may disable read access to the EEPROM arrayMUCts03649

Description

An interrupt request immediately following execution of a STOP

instruction may cause the EEPROM array to return incorrect data when
read. The problem will only occur if all of the following conditions
are
met:

1) S bit in the CCR register is cleared (stop mode enabled)
2) I bit in the CCR register is cleared (interrupts enabled)
3) A STOP instruction is executed by the microcontroller
4) An interrupt becomes pending between 0 and 0.5 bus clock cycles
after beginning of the STOP instruction execution.

In this case the microcontroller will wake-up correctly from the stop
mode, but the EEPROM array will return incorrect data when a read
operation is performed.

Access (read or write) to any of the EEPROM registers or write into the
EEPROM array (to start a command sequence) will restore the read
access. The EEPROM will return the correct data afterwards.

Workaround


If the STOP instruction is executed while interrupts are enabled, read 

or write any of the EEPROM registers after wake-up from stop mode to
ensure correct operation. Alternatively a write into the EEPROM array
(as part of a command sequence) can be performed instead of the
register access.



vreg_3v3.05.02: Possible incorrect operation if device is wakened from stop mode within 4.7µs of stop mode entryMUCts03653

Description

It is possible that after the device enters Stop or Pseudo-Stop mode it

may reset rather than wake up normally upon reception of the wake-up
signal.

CONDITIONS:
This event will only happen provided ALL of the following conditions are
met:
1) Device is powered by the on-chip voltage regulator.
2) Device enters stop or pseudo-stop mode (see Stop mode entry
description below)
3) The wake-up signal is activated within a specific and very short
window (typically 11ns long, not longer than 20ns). The position of the
window varies between different devices, however it never starts sooner
than 1.6µs and never ends later than 4.7µs after the stop mode entry.

This narrow width of the susceptible window makes the erratum unlikely
to ever show in the applications life.

Stop or Pseudo-Stop mode entry are:
1) Execution of STOP instruction by the CPU (provided the S-bit in
CCR is cleared)
NOTE: The part enters stop mode either after 12 oscillator clock cycles
with the PLL disengaged or 3 PLL clock cycles and 8 oscillator clock
cycles with the PLL engaged after the STOP command is executed.
2) End of XGATE thread (provided the CPU is in stop or pseudo-stop
mode)

The incorrect behavior will never occur if ANY of the wake-up conditions
are met at the time when the stop mode entry is attempted (an enabled
interrupt is pending).

EFFECT:
If this incorrect behavior occurs, the device will Reset and indicate a
Low Voltage Reset (LVR) as the reset source.
The device will operate normally after the reset.

Workaround


None. 


--

Asynchronous Low Voltage Resets are possible in any microcontroller
application (due to power supply drops) and the integrated LVR and LVI
features and dedicated LVR reset vector are provided to manage this fact
cleanly. For best practice, the application's software should be written
to recover from a Low Voltage Reset in a controlled manner. Software
written to deal with valid Low Voltage Resets should be implemented to
correctly manage erroneous LVR events.

It is also be possible to avoid erroneous Low Voltage Resets from
synchronous wake-up events by configuring the application software to
ensure that the entry into stop occurs at such a time, in relation to
the wake-up event timer, that a wake-up event does not occur within
1.6µs to 4.7µs after Stop/Pseudo-Stop entry.



ADC: conversion does not start with 2 consecutive writes to ATDCTL5MUCts03689

Description

When the ATD is started with write to ATDCTL5

and, which is very unusual and not necessary,
within a certain period again started with write
to ATDCTL5. The conversion will not start at all.
This does only happen if the two consecutive writes to ATDCTL5 occur
within one "ATD clock period". An ATD clock period is defined by a full
rollover of the ATD clock prescaler. That is for example PRS[4:0] = 2 -
> (2+1)*2 = within 6 bus cycles.


Workaround


Only write once to ATDCTL5 when starting a conversion.


Use the recommended start and abort procedures from the Block Guide.
Section : Initialization/Application Information Subsection: Setting up
and starting an A/D conversion Subsection: Aborting an A/D conversion



DBG: State flags and counter corrupted by simultaneous arm and disarmMUCts03760

Description

Simultaneous disarming (hardware) and arming (software) results in 

status, flag and counter register (DBGSR, DBGMFR, DBGCNT) corruption.

Hardware disarming initiated by an internal trigger or by tracing
completion takes 2 clock cycles. If a write to DBGC1 with the ARM bit
set occurs in the final clock cycle of this disarming process, arming
is suppressed but the DBGSR register is initialized to state1 and
DBGMFR/DBGCNT are initialized to zero.

The result is that the DBG module is disarmed by hardware but DBGSR
indicates state1.

NOTE: DBGC1 is typically only written to whilst armed to set the TRIG
bit or update the COMRV bits to map different registers to the address
map window.

Generally during debugging, after arming the DBG module and returning
to application code a further write access of DBGC1 over the BDM
interface requires considerable time relative to application code
execution, therefore in many cases the breakpoint may be reached before
a DBGC1 update is attempted. Furthermore the probability of hitting the
same cycle is seen to be very low.


Workaround


If the fault condition is caused by writing to DBGC1 to set the TRIG 

bit (to request an immediate breakpoint), then the application code may
be rerun again without the attempted setting of TRIG. The software
trigger (TRIG) is unnecessary in any case at the same point point in
time as an internal hardware trigger occurs.

Development tool vendors should avoid COMRV updates while the DBG is
armed.

Users that observe the problem due to development tool COMRV updates
can add a NOP to code and rerun to shift the disarm cycle, thereby
preventing a collision with the COMRV updates.



CPU: Breakpoint missed at simultaneous taghitsMUCts03871

Description

The CPU execution priority encoder evaluates taghits and then 

generates a breakpoint if a taghit must lead to an immediate
breakpoint as determined by the DBG module.

If the DBG module indicates that this taghit leads to an immediate
breakpoint then the CPU loads the execution stage with SWI or BGND thus
generating the breakpoint.

At simultaneous taghits the lowest channel has priority.
If taghits on 2 channels simultaneously, whereby the lower channel tag
must be ignored, but the higher channel tag must cause a breakpoint,
then the breakpoint request is erroneously missed.
Thus if channel[1:0] taghits occur simultaneously whereby channel[0]
must be ignored but channel[1] must cause a breakpoint, then the
breakpoint request on channel[1] is erroneously missed and no
breakpoint generated.

The DBG module recognises the taghit and the state sequencer
transitions accordingly.
This bug requires that separate tags are placed on the same
instruction. This is not a typical case when using exact tag addresses.
It is more relevant in debugging environments using range modes, where
tags may cover a whole range. In this case a tagged range may cover a
tag or another tagged range, making simultaneous taghits possible.

This is a debugging issue only.
This CPU is integrated with DBG versions that do not issue a forced
breakpoint, thus the errata differs slightly from the parent MUCts03865.


Workaround


Do not attach multiple tags to the same exact address. 

When attaching multiple tags to the same address by overlapping tag
ranges in range modes, or covering a tag with a tag range in range
modes, then the missed tag can be avoided by mapping the final state
change to the lower channel number.

For example the case
Channel[0] tags a range; channel[3] tags an instruction within that
range.
From DBG State1 Taghit[0] leads to State2. (DBGSCR1=$6)
From DBG State2 Taghit[3] leads to FinalState.(DBGSCR2=$5)
In State2 a simultaneous Taghit[3,0] scenario would miss the breakpoint.

This can be avoided by using the alternative DBG configuration
Channel[2] tags a range; channel[0] tags an instruction within that
range.
From DBG State1 Taghit[2] leads to State2. (DBGSCR1=$3)
From DBG State2 Taghit[0] leads to FinalState.(DBGSCR2=$7)



PWM: Emergency shutdown input can be overruledMUCts03977

Description

If the PWM emergency shutdown feature is enabled (PWM7ENA=1) and PWM

channel 7 is disabled (PWME7=0) another lower priority function
available on the related pin can take control over the data direction.
This does not lead to a problem if input mode is maintained. If the
alternative function switches to output mode the shutdown function may
unintentionally be triggered by the output data.


Workaround


When using the PWM emergency shutdown feature the GPIO function on the

pin associated with PWM channel 7 should be selected as an input.

In the case that this pin is selected as an output or where an
alternative function is enabled which could drive it as an output,
enable PWM channel 7 by setting the PWME7 bit. This prevents an
active shutdown level driven on the (output) pin from resulting in an
emergency shutdown of the enabled PWM channels.




PIM: Edge-sensitive mode of IRQ-pin may cause incorrect interrupt vector fetchMUCts04086

Description

Where the IRQ interrupt is being used in edge-sensitive mode and a 

lower priority interrupt is already pending when an IRQ edge event
occurs, if the IRQ edge event occurs inside a very narrow (<3ns) window
just as the pending interrupt vector is being fetched, then a different
vector other than that relating to either the pending interrupt or IRQ
will be taken.

In the case that a programmed interrupt vector is fetched both the
originally pending interrupt and the IRQ interrupt request will remain
pending and will be serviced once the erroneously called service
routine has completed (and RTI has been executed).

In the case that the incorrect vector fetch is from an unprogrammed
vector table entry (i.e. erased state = 0xFFFF) then erroneous
execution from the start of the register space will occur most often
resulting in an illegal memory access reset, COP reset or Unimplemented
Instruction Trap occurring.

In the less likely case that one of the three reset vectors is
incorrectly fetched then execution will jump to the appropriate reset
code.

The following vectors are not affected will not cause erroneous
behavior if pending:
$F0 - RTI
$F6 - SWI
$E2 – ECT channel 6
$B2 – CAN0 Rx
$72 – XGATE software trigger 0

This issue is limited to the edge-sensitive mode of the IRQ input only -
applications not using IRQ interrupts or configured for level-
sensitive IRQ input are not affected.

There is no issue where a pending interrupt has higher priority than
the IRQ request.

Workaround


Where using IRQ in edge-sensitive mode then configure the interrupt 

priority levels of all interrupts being used to ensure that the IRQ
request always has the lowest priority.

For new designs, where possible use the IRQ input in level-sensitive
mode or alternatively use a key-interrupt port.

There are a number of ‘best practices’ and features of the S12X which
can help minimize the impact of this errata in the case of it occurring:

1) As ‘best practice’ initialize all unused and unimplemented/reserved
interrupt vector table locations to point to a dummy interrupt service
routine (terminated with an RTI).

2) Where possible, check for appropriate asserted flags in interrupt
service routines and return / flag a system error if no request flag is
set.

3) Support is provided on the MCU for managing the following system
conditions:
* COP watchdog reset
* Illegal access reset
* Unimplemented instruction trap
For ‘best practice’ the application's software should be written to
recover from any of these conditions in a controlled manner.

4) In the case of erroneous code execution jumping to unused Flash the
typical practice of filling all unused Flash and RAM space with the op-
code for the SWI instruction will help manage this. SWI exception
routine should be written in this case to manage this event.




ECT: Channel 0 - 3 Input Capture interrupts inhibited when BUFEN=1, LATQ=0 and NOVWx=1MUCts04104

Description

Channel 0 – 3 Input Capture interrupts are inhibited when BUFEN=1, 

LATQ=0 and NOVWx=1 if an Input Capture edge occurs during or between a
read of TCx and TCxH or between a read of TCx/TCxH and clearing of CxF.


Details:

When any of the buffered input capture channels 0 - 3 are configured
for buffered/queue mode (BUFEN=1, LATQ=0) each of the channel’s input
capture holding registers and each channel’s associated pulse
accumulator and its holding register are enabled. When the input
capture channel is enabled by writing to a channel’s EDGxB and EDGxA
bits, both the input capture and input capture holding register are
considered empty. The first valid edge received after enabling a
channel will latch the ECT’s free running counter into the input
capture register (TCx) without setting the channel’s associated CxF
interrupt flag. The second valid edge received will transfer the value
of the input capture register, TCx, into the channel’s TCxH holding
register, latch the current value of the free running timer into the
input capture register and set the channel’s associated CxF interrupt
flag. In this condition, both the TCx and TCxH registers are
considered ‘full’.

If a corresponding channel’s NOVWx bit in the ICOVW register is set,
the capture register or its holding register cannot be written by a
valid edge at the input pin unless they are first emptied by reading
the TCx and TCxH registers. The act of reading the TCx and TCxH
registers and clearing the channel’s associated CxF interrupt flag
involves three separate operations. Two 16-bit read operations and an 8-
bit write operation.

If a channel’s associated CxF interrupt flag is cleared before reading
the TCx and TCxH registers and if a valid input edge occurs during or
between the reading of the capture and holding register, a channel’s
associated CxF interrupt flag will no longer be set as the result of
valid input edges. For example:

Clear CxF
|
|
V
Read TCx <----+
| |
|<--------+--- Valid Input Edge Occurs
V |
Read TCxH <---+

If the TCx and TCxH registers are read before a channel’s associated
CxF interrupt flag is cleared and if a valid input edge occurs between
the reading of TCx/TCxH and the clearing of a channel’s associated CxF
interrupt flag, a channel’s associated CxF interrupt flag will no
longer be set as the result of valid input edges. For example:

Clear CxF
|
|
V
Read TCx
|
|<------------ Valid Input Edge Occurs
V
Read TCxH


Systems that service the interrupt request and read the TCx and TCxH
registers before the next valid edge occurs at a channel’s associated
input pin will avoid the conditions under which the errata will occur.

Workaround


A simple workaround exists for this errata:


1. Clear the input capture channel’s associated CxF bit.
2. Disable the input capture function by writing 0:0 to a channel’s
EDGxB and EDGxA bits.
3. Read TCx
4. Read TCxH
5. Re-enable the input capture function by writing to a channel’s EDGxB
and EDGxA bits.


Code Example:

unsigned char ICSave;
unsigned int TC0Val;
unsigned int TC0HVal;

ICSave = TCTL4 & 0x03; /* save state of EDG0B and EDG0A */
TFLG1 = 0x01; /* clear ECT Channel 0 flag */
TCTL4 &= 0xfc; /* disable Channel 0 input capture function */
TC0Val = TC0; /* Read value of TC0 */
TC0HVal = TC0H; /* Read value of TC0H */
TCTL4 |= ICSave; /* Restore Channel 0 input capture function */



PWM: Wrong output level after shutdown restart in 16bit concatenated channel modeMUCts04135

Description

When the PWM is used in 16-bit (concatenation) channel and the emergency

shutdown feature is being used, after de-asserting PWM channel 7
(note:PWMRSTRT should be set) the PWM channels do
not show the state which is set by PWMLVL bit when the 16-bit counter is
non-zero.




Workaround


If emergency shutdown mode is required:


In 16-bit concatenation mode, user can disable the related PWM
channels and set the corresponding general-purpose IO to be the PWM
LVL value. After a intend period, restart the PWM channels.





PWM: Wrong output value after restart from stop or wait modeMUCts04136

Description

In low power modes (P-STOP/STOP/WAIT mode) and during PWM7

de-assert and when PWM counter reaching 0, the PWM channel outputs
cannot keep the state which is set by PWMLVL bit.






Workaround


Before entering low power modes, user can disable the related PWM 

channels and set the corresponding general-purpose IO to be the PWM
LVL value. After a intend period, restart the PWM channels.








ECT_16B8C: Output compare pulse is inaccurateMUCts04156

Description

The pulse width of an output compare (which resets the free running

counter when TCRE = 1) will measure one more bus clock cycle than
expected.



Workaround


The specification has been updated. Please refer to revision V03.08 (04

May 2010) or later.

In description of bitfield TCRE in register TSCR2,a note has been added:
TCRE=1 and TC7!=0, the TCNT cycle period will be TC7 x "prescaler
counter width" + "1 Bus Clock". When TCRE is set and TC7 is not equal to
0, then TCNT will cycle from 0 to TC7. When TCNT reaches TC7 value, it
will last only one bus cycle then reset to 0.







Flash: Burst programming issue if bus clock frequency is higher than oscillator clock frequencyMUCts04166

Description

If S12X is running at a bus clock frequency higher than the oscillator

clock frequency (Fbus > Fosc), flash words may remain not programmed
after a program burst sequence. Software methods can be used to avoid
this problem. If burst programming is not used, no errors occur.

The root cause of this issue is related to flash internal state machine
which needs about 2 to 3 oscillator clock periods to be ready to accept
a new flash command after the assertion of the CBEIF flag.

Note that this latency of flash state machine is related to the
assertion of CBEIF and the start of a new command sequence (i.e. a write
to a flash word). There is no latency after the assertion of the CCIF flag.



Workaround


Adding a time delay between the check of CBEIF flag and the start of the

next flash program command sequence will ensure that all words will be
programmed. Add a delay of (3 * (Fbus/Fosc)) Bus clock cycles after
CBEIF is set, that can be achieved by the addition of NOPs (one NOP
instruction takes one bus cycle to execute).

Note that since a flash word program operation takes much longer than 3
oscillator clock periods, there is no impact in the total programming
time of a long program burst sequence by adding a delay of 3 clocks.

The example below illustrates the proposed workaround:

Code below executes a program burst sequence by launching a new flash
program command right after the assertion of the CBEIF flag.


1 LDX #(PGM_ADDR_START+PGM_SIZE) ;Load X with last addr+1
2 STX TMP_VAR ;Store last programmed addr+1 at
tmp_w1 var
3 LDX #PGM_ADDR_START ;Load X with start addr
4
5 LOOPGM: ;Loop Program
6 BRCLR FSTAT, #$80, * ;Wait for buffer empty (CBEIF = 1)
7
8 ; -> Time delay of 3 Osc clock periods must be inserted at this point.
9
10 MOVW #DATA 2,X+ ;Write DATA to address pointed by
index X
11 MOVB #FCMD_PGM FCMD ;Write PGM command code to FCMD
register
12 MOVB #$80 FSTAT ;Launch command
13 CPX TMP_VAR
14 BLO LOOPGM

The minimum time delay for the code above can be found by the equation
below:

Time delay (in Bus clock cycles) = 3*(Fbus/Fosc) - (bus clock cycles
need by BRCLR at line 6) - (bus clock cycles needed by MOVW at line 10)

Considering that the BRCLR instruction at line 6 takes 3 bus clock
cycles after the assertion of the CBEIF and that the MOVW takes 3 bus
clock cycles to be executed, the equation above can be written as:

Time delay (in Bus clock cycles) = 3*(Fbus/Fosc) - 6

For the case of Fosc=4MHz and Fbus=12MHz, a time delay of
3*(12MHz/4MHz) - 6 = 3 bus clock periods is needed. So, at least 3 NOP
instructions must be inserted at line 8 for proper operation, in this
example.

Depending on the configuration of Bus clock frequency and oscillator
clock frequency, and due to the actual code used in the application, the
required time delay of 3 oscillator clock cycles may be already spent
inside of the programming routine and the problem will not be detected.
Under certain conditions described by the equations and explanation
above, adding NOPs may not be required.





FTX: Flash Command influenced by Backdoor Key writeMUCts04238

Description

When executing a flash erase verify (0x05) command sequence to a flash 

block different from the block where the backdoor keys are written to,
both blocks will be erase verified. Any programmed location in either
block will terminate the operation preventing the FSTAT.BLANK flag from
setting.

When executing a flash data compress (0x06) command sequence to a flash
block different from the block where the backdoor keys are written to,
a given number of words from both blocks will be compressed, this
number will be equal to the value written at last key’s address. The
signature from the block containing the backdoor keys will affect the
signature returned in the FDATA register.

When executing a flash program (0x20) command sequence to a flash block
different from the block where the backdoor keys are written to, both
blocks will be programmed at the same relative address with the
unselected block being programmed to a data value equal to the last key
written. Setting protection at the location in the block where the
backdoor keys are written will not prevent the flash command from
executing.

When executing a flash sector erase (0x40) command sequence to a flash
block different from the block where the backdoor keys are written to,
both blocks will receive the erase at the sector address provided in
the flash sector erase command sequence. Setting protection in the
location where the backdoor keys are written to will not prevent the
flash command from executing.

When executing a flash mass erase (0x41) command sequence to a flash
block different from the block where the backdoor keys are written to,
both blocks will be erased. Setting protection in the block where the
backdoor keys are written to will not prevent the flash command from
executing.

The flash sector erase abort (0x47) command is not impacted as all
active sector erase operations will be terminated if successfully
aborted.

Workaround


Write 0x30 to FSTAT register (ACCERR = 1, PVIOL = 1) prior to 

executing any flash command sequence when backdoor keys have been
written. This step can be done in conjunction with or instead of
checking the FSTAT register as shown in the flash command sequence
flow in the reference manual.



SCI: RXEDGIF occurs more times than expected in IR modeMUCts04244

Description

Configured for Infrared Receive mode, the SCI may incorrectly set the 

RXEDGIF bit if there are consecutive '00' data bits. There are two
cases:

Case 1: due to re-sync of the RXD input, the received edge may be
delayed by one bus cycle. If an edge (bit = '0') is detected near
an SCI clock edge, the next edge (bit = '0') may be detected one
SCI clock later than expected due to re-sync logic.

Case 2: if external baud is slower than SCI receiver, the next edge
may be detected later than expected.

This glitch can be detected by the RXEDGIF circuit, but it does not
impact the final data result because the SCI receive and data recovery
logic takes samples at RT8, RT9, and RT10.




Workaround


Case 1 and case 2 may occurs at same time. To avoid those unexpected 

RXEDGIF at IR mode, the external baud should be kept a little bit
faster than receiver baud by:
P > (1/16)/(SBR)
or
(P)(SBR)(16)> 1

Where SBR is baud of receiver, P is external baud faster ratio.
For example:
1.- When SBR = 16, P = 0.4%, this means the external baud should be at
least 0.4% faster than receiver.
2.- When SBR = 4, P = 1.6%, this means the external baud should be at
least 1.6% faster than receiver.

Case 1 will cover case 2, i.e. case 1 is the worst case. If case1 is
solved, case 2 is also solved.


© NXP Semiconductors, Inc., 2012. All rights reserved.