![Freescale Semiconductor MPC5604B Скачать руководство пользователя страница 86](http://html1.mh-extra.com/html/freescale-semiconductor/mpc5604b/mpc5604b_quick-start-manual_2330604086.webp)
4.2.3.
Operations
Some common operations are defined, using SPI and PWM, (see code for details),
-
config_HS: Enabling/disabling a high-side switch,
-
write_HS: Sets/clears a high-side switch output,
-
conf_PWM_HS: Starts a 300Hz PWM applied on the high-side switches.
-
duty_cycle_PWM_HS: Sets the duty cycle of an output PWM.
-
read_fault: a function that updates the _MC33984_STATUS structure’s flag registers.
4.2.4.
User interface
An UART terminal user interface was developed, allowing the use of some commands to drive
the chip directly from a computer.
4.2.5.
Testing
Most of this driver’s functionalities were tested. Firstly, Freescale’s SPIGen program was used
with an SPI Dongle to test read and write actions on the device’s registers. Then the developed
terminal application was used to test basic switching operations.
There was a problem on PWM duty cycle: the microcontroller used 5V TTL logic, and the high-
side switch used 5V CMOS logic. Therefore the duty cycle at the drain of the chip was higher than
the duty cycle at the gate. A pull-up resistor with an adequate value or a level-shifter chip must
be used to output the correct pulse.
Current read and fault reading functionalities were not tested.
SPI driver was updated after the tests so it might need a few adjustments if it does not work as it
is.
Содержание MPC5604B
Страница 1: ...LAAS CNRS Quick Start to MPC5604B Embedded Development Sahin Serdar 21 06 2013...
Страница 31: ...Figure 33 INTC SW HW mode comparison Freescale Tutorial...
Страница 87: ......
Страница 132: ......
Страница 133: ...127 Appendix 2 Pad Configurations...
Страница 134: ......
Страница 135: ......
Страница 136: ......
Страница 137: ......
Страница 138: ......
Страница 139: ......
Страница 140: ......
Страница 141: ...Appendix 3 Peripheral input pin selection...
Страница 142: ......
Страница 143: ...137 Appendix 4 Interrupt Vector Table...
Страница 144: ......
Страница 145: ......
Страница 146: ......
Страница 147: ......
Страница 148: ...Appendix 5 I C Baud Rate Prescaler Values...
Страница 149: ......
Страница 150: ......