English
Language : 

PXR40RM Datasheet, PDF (1260/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Enhanced Time Processing Unit (eTPU2)
Notice that channels 2 and 8 are well within their WCL requirements. The system could be reconfigured
as shown in Table 29-28 to give channels 0 and 1 a larger margin while still keeping channels 2, 8 and 15
within their WCL requirements.
Table 29-28. Second-Try System with Channel 0 and 1 Reconfigured
Channel Priority
Function1, 2
0
High PWM at 50 kHz (needs a 10-s WCL)
1
High PWM at 50 kHz (needs a 10-s WCL)
2
Middle PWM at 5 kHz (needs a 40-s WCL)
8
Low PPWA at 5 kHz (needs a 80-s WCL)
15
Low
DIO as input at rate of 1 ms
1 0% RAM collision rate
2 CPU clock rate = 40 MHz, or 60 ns per clock period
29.4.3 MISC Algorithm
The MISC generator is based on the following polynomial:
G(x) = 1 + x1 + x2 + x22 + x31 (equivalent to feedback mask = 0x80400007)
The MISC signature generation starts by clearing the MISC Accumulator value to 0 and preloading the
MISC Counter with the highest SCM address. It then steps through each address decrementing the counter,
reading 32 bit values and following the algorithm below:
If the least significant bit in MISC is 1 then
MISC = MISC right shifted by 1 bit
MISC = MISC XOR 0x80400007
else
MISC = MISC right shifted by 1 bit
end if
MISC = MISC XOR RAM data
The code example below shows an excerpt of C code that calculates the MISC signature for a given array
of data, based on the previous algorithm:
#define SCM_size (MAX_SCM_ADDRESS / 4) /* last byte address - converted to 32-bit word */
#define POLY
0x80400007
/* G(x) = 1 + x1 + x2 + x22 + x31 */
/*******************************************************************************
FUNCTION : void calc_misc()
PURPOSE : This function calculates the MISC value.
INPUTS NOTES : none
RETURNS NOTES : MISC value
GENERAL NOTES : the array ’unsigned int data[]’ represents the actual memory
array, organized in 32-bit words.
*******************************************************************************/
unsigned int calc_misc (void)
29-92
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor