NXP S12ZVL User guide

  • Hello! I am an AI chatbot trained to assist you with the NXP S12ZVL User guide. I’ve already reviewed the document and can help you find the information you need or explain it in simple terms. Just ask your questions, and providing more details will help me assist you more effectively!
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.
/