英飞凌单片机例程tc1767_taskingv33r2_dcm_ltc

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Create New Project Click on File New Select „Tasking VX-toolset for Tricore C/C++ Project‟
1
confidential
Page 25
Exercise GPTA_LTC_DCM Tasking Viper: Create New Project(cont.)
confidential
Page 7
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA Clock Module clock:
Enable GPTA Module Select normal divider mode Set the required module clock to 20MHz
Select Divided GPTA0 clock. Select divide factor 2^14.
confidential
Page 11
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Input pins/GPTA0_IN0
confidential
Page 13
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC0/Data Input:
Internal input: Select Clock 4.
confidential
Create Project name „GPTA_LTC_DCM ´ Select ‘Use default location’ Select ‘Empty project’ Click ‘Next’
Same name as DAvE directory
1
confidential
Page 26
Exercise GPTA_LTC_DCM Tasking Viper:Create New Project(cont.)
Set Target Board Configuration
Click on
Select „Infineon Easy Kit TC1767‟ Select „DAS over on-board USB wiggler‟ Select „Single Chip‟ and Select „TC1767‟ and Disable “Update Startup Code”
if the included function is a macro it is included in the „.h‟ file if the included function is a function it is included in the „.c‟ file
File main.c,main.h,gpta0.c,gpta0.h,io.c and io.h will be generated
confidential
Page 22
Exercise GPTA_LTC_DCM Tasking Viper : Open a workspace
Start TASKING VX-toolset for tricore Click on Open Project Work Space Filename: browse to “d:\hot\tc1767” Click „OK‟
GPTA0 Local Timer Cell /LTC1/Data Input:
confidential
Page 16
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC2/LTC2:
confidential
Page 17
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC2/Data Input:
confidential
Page 18
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
LTC0 as a timer LTC1 as a capture mode (rising edge) LTC2 as a capture mode (falling edge)
Let’s get started now!
confidential
Page 2
Exercise GPTA_LTC_DCM Block diagram
Click on the GPTA0 module Select window: Clock Generation Click CDU button
confidential
Page 10
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Clock Generation / CDU / Clock Bus 5-4:
General Purpose Timer Array Exercise GPTA_LTC_DCM
Exercise GPTA_LTC_DCM Objective
Using 3 Local Timer Cells (LTC), perform a duty cycle measurement by configuring
Tricore Project Settings Click “AUDO Future Family” and select “TC1767” Enable “C startup code”,”Linker script file” and “synchronizaqtion file”
confidential
Software
P5.0
TC1767
Clock 4
Timer
Reset timer
P0.0
Capture(Rising) Capture(Falling)
confidential
Page 3
Exercise GPTA_LTC_DCM DAvE Configurations
Start DAvE for TC1767.
Create a new project: Go to File New Select microcontroller: „TC1767‟.
confidential
Page 4
Exercise GPTA_LTC_DCM DAvE Configurations(cont.)
Project Settings - opens automatically General:
Save (File Save) this DAvE file in : d:\hot\tc1767\gpta_ltc_dcm\gpta_ltc_dcm.dav Let DAvE now generate the code for you Go to File Generate Code or click: DAvE opens a new window with the Project Documentation file. On the left hand side a browser window shows the generated files. You can take a look at the generated code or just find out in which file DAvE put the included functions. In general:
confidential
Page 23
Exercise GPTA_LTC_DCM Tasking Viper : Create New Project
Click on Workbench (if not already there…)
1
confidential
Page 24
Exercise GPTA_LTC_DCM Tasking Viper: Create New Project(cont.)
Fvco : 640MHz System Clock:80MHz
External oscillator
confidential
Page 6
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
Click on the GPTA Clock module:
Click on the + to the right of „GPTA_LTC_DCM‟ to expand the project
Create by Dave
Main.c Main.h Gpta0.c Gpta0.h Io.c Io.h
confidential
Page 28
Exercise GPTA_LTC_DCM Tasking Viper : Setting Target Board
Page 27
Exercise GPTA_LTC_DCM Tasking Viper : Reflash Project
Refresh files in the project Right click on „GPTA_LTC_DCM‟ in the navigator
Select „Refresh‟ from the pull down menu
Page 14
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC1/LTC1:
confidential
Baidu Nhomakorabea
Page 15
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
Page 20
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
Ports Ports / Functions:
confidential
Page 21
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Functions:
Select “GPTA0_vInit”.
confidential
Page 19
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
Click on the Ports module:
Click here
confidential
confidential
Page 8
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA Clock Timer Clock Control:
Enable GPTA0 Timer clock.
confidential
Page 9
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
confidential
Page 12
Exercise GPTA_LTC_DCM DAvE Configurations (cont.)
GPTA0 Local Timer Cell /LTC0/LTC0:
Enable LTC0 after initialization. Mode selection: Timer with reset from adjacent LTC with higher order. Connect the input line to LTC0. Enable rising edge of selected input signal
Compiler Settings: Tasking Enable “Use Infineon DAvE sfr Header”
confidential
Page 5
Exercise GPTA_LTC_DCM DAvE Configurations(cont.)
Project Settings - opens automatically General:
相关文档
最新文档