![Freescale Semiconductor MPC5604B Quick Start Manual Download Page 61](http://html1.mh-extra.com/html/freescale-semiconductor/mpc5604b/mpc5604b_quick-start-manual_2330604061.webp)
And finally, there is an interrupt flag register (WTISR) for all watchdogs, containing six flags,
WDGxL and WDGxH, x=0…3, for each interrupt. And a mask register (WTIMR) with six match
bits, MSKWDGxL and MSKWDGxH, x=0…3, that has to be set to enable the corresponding
interrupts.
2.6.
Channel Registers
There are mask registers for enabling sampling phase for each channel; for normal conversions
we have NCMR[0…2] and for injected conversion we have JCMR[0…2]. Both registers have one-
bit fields for each registers (16 in types 0 and 1 registers, 32 in type 2 register) named CHx,
x=0..31. The sampling of a channel can be enabled by setting these fields.
Figure 74 : Channel Data Register (R.M. Rev8 – Fig. 25-35)
There are 96 Channel Data Registers (CDR[0…95]) where channels 0…15 are for precision
channels, 32…47 for standard channels and 64…95 are for external multiplexed channels. These
registers contain information about the converted result. The field VALID notifies if a new value
has been written (and it is automatically cleared when data is read). OVERW signals if a previous
non read data has been overwritten (can only occur if OWREN is set) and RESULT indicates from
which mode of conversion the data comes (00:Normal, 01:Injected, 10:CTU). CDATA field
contains the converted data, and its position on the register depends on WLSIDE bit on MCR
register.
NOTE: the C header file only supports WLSIDE=0 field!!
3.
ADC Example with PIT and eMIOS
In this example, an ADC reads a potentiometers value and PIT2 triggers an injected conversion
periodically using the hardware connection PIT2 has with ADC. Once a conversion ends,
depending on user’s selection, the value read is either displayed on four LEDs or it is used to set
an eMIOS OPWMs duty cycle.
For setting up the timer the following functions are used:
Summary of Contents for MPC5604B
Page 1: ...LAAS CNRS Quick Start to MPC5604B Embedded Development Sahin Serdar 21 06 2013...
Page 31: ...Figure 33 INTC SW HW mode comparison Freescale Tutorial...
Page 87: ......
Page 132: ......
Page 133: ...127 Appendix 2 Pad Configurations...
Page 134: ......
Page 135: ......
Page 136: ......
Page 137: ......
Page 138: ......
Page 139: ......
Page 140: ......
Page 141: ...Appendix 3 Peripheral input pin selection...
Page 142: ......
Page 143: ...137 Appendix 4 Interrupt Vector Table...
Page 144: ......
Page 145: ......
Page 146: ......
Page 147: ......
Page 148: ...Appendix 5 I C Baud Rate Prescaler Values...
Page 149: ......
Page 150: ......