Enhanced Time Processing Unit (eTPU2)
29-92
Freescale Semiconductor
PXR40 Microcontroller Reference Manual, Rev. 1
Notice that channels 2 and 8 are well within their WCL requirements. The system could be reconfigured
as shown in
to give channels 0 and 1 a larger margin while still keeping channels 2, 8 and 15
within their WCL requirements.
29.4.3
MISC Algorithm
The MISC generator is based on the following polynomial:
G(x) = 1 + x
1
+ x
2
+ x
22
+ x
31
(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 + x
1
+ x
2
+ x
22
+ x
31
*/
/*******************************************************************************
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)
Table 29-28. Second-Try System with Channel 0 and 1 Reconfigured
Channel
Priority
Function
1
,
2
1
0% RAM collision rate
2
CPU clock rate = 40 MHz, or 60 ns per clock period
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
Summary of Contents for PXR4030
Page 1: ...PXR40 Microcontroller Reference Manual Devices Supported PXR4030 PXR4040 PXR40RM Rev 1 06 2011...
Page 30: ...PXR40 Microcontroller Reference Manual Rev 1 Freescale Semiconductor xxx...
Page 40: ...PXR40 Microcontroller Reference Manual Rev 1 xl Freescale Semiconductor...
Page 66: ...Memory Map PXR40 Microcontroller Reference Manual Rev 1 2 4 Freescale Semiconductor...
Page 120: ...Signal Descriptions 3 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 860: ...FlexCAN Module 24 50 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...
Page 1167: ...Decimation Filter Freescale Semiconductor 28 53 PXR40 Microcontroller Reference Manual Rev 1...
Page 1168: ...Decimation Filter 28 54 Freescale Semiconductor PXR40 Microcontroller Reference Manual Rev 1...