NXP S12ZVL User guide

Type
User guide
External Use
TM
Getting started with S12ZVL32
S12 MagniV
Training Labs
A u g . 0 3 . 2 0 1 5
TM
External Use 1
Agenda.
Low Power Hands-On Exercise
Description
Low Power Capabilities
Flow Chart
Adjust wake-up time
PWM Hands-On Exercise
Description
Flow Chart
Plot of signals
SPI Hands-On Exercise
Description
Flow Chart
Connections/ Results
EVDD Hands-On Exercise
Description
Flow Chart
Connections
TM
External Use 2
Low Power Hands-on Exercise
S12ZVL_ Training
TM
External Use 3
Low Power Hands-on Exercise
Purpose and description:
Demonstrate the S12ZVL low power capabilities, In this Project the MCU is in
stope mode mode but is woken-up by an autonomous periodical interrupt.
In each interrupt led PP5 will toggle.
TM
External Use 4
S12ZVL low power functionality
Apart from Run mode, the following table summarizes the low
power capabilities.
*tlock: (150 +256/fREF)us
Operating
mode
Current
consumption
(
typ)
Active
functionality
Wake up
sources
Wake
up
time
Wait
~26mA
*ADC
*Timers
*PLL
*SCI
*I2C
*Timers
*KWI
*PIM
*SCI
tlock
Stop
~23uA
*ACLK
*KWI
*API
*XIRQ
*IRQ
23us+tlock
TM
External Use 5
Low Power Hands-on Exercise
1. Create a new Project in CodeWarrior
2. Add the Low Power code
3. Download/Debug the code
4. Modify the wake-up frequency
TM
External Use 6
Low Power Hands-on exercise
Create a new project in CodeWarrior
1. File -> New -> Bareboard Project
2. Name the project. Click next
3. Select device: S12Z -> S12ZVL Family -> MC9S12ZVL32
4. Debug connection: Select “Open Source BDM”
5. Build options are left as default, click next
6. Rapid is not used, click Finish
TM
External Use 7
Low Power Hands-on exercise
TM
External Use 8
Low Power Hands-on exercise
TM
External Use 9
Low Power Hands-on exercise
TM
External Use 10
Low Power Hands-on exercise
TM
External Use 11
Low Power Hands-on exercise
TM
External Use 12
Low Power Hands-on exercise
TM
External Use 13
Low Power Hands-on exercise
Add the Low Power code
1. Open “S12ZVL_Training/Labs/S12VL_Training_LP”
2. Open “Sources/main.c
3. Copy all the code
4. Go back to CodeWarrior
5. Open “main.c”
6. Replace all the code
TM
External Use 14
Low Power Hands-on exercise
Flow Chart
TM
External Use 15
Low Power Hands-on exercise
Download / debug the code and run it
TM
External Use 16
Low Power Hands-on exercise
Verify Green led is blinking
TM
External Use 17
Low Power Hands-on exercise
Modify wake-up frequency changing the value on CPMUAIRH
and CPMUAIRH register
How to adjust your wake up time.
Desired wake
up time
CPMUAIRH
CPMUAIRL
100ms
0x02 0x7C
500ms
0x0C 0x6D
1s
0x18 0xDA
5s
0x7C 0x45
* Assuming autonomous internal clock of 25.4Khz
TM
External Use 18
PWM Hands-on Exercise
S12ZVL_ Training
TM
External Use 19
PWM Hands-on Exercise
Purpose and Description:
In this project you will setup the PWM module. Configuring time
sources, prescalers and duty cycles for the different pins of port P.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48

NXP S12ZVL User guide

Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI