资源简介
DSP28377s的完整标准程序,已经在装置上运行,系统设置/ADC/PWM/定时器/GPIO/UART/IIC/SPI所有接口齐全,仿照就能用!
代码片段和文件信息
//###########################################################################
// FILE: F2837xS_Adc.c
// title: F2837xS Adc Support Functions.
//###########################################################################
// $TI Release: F2837xS Support Library v191 $
// $Release Date: Fri Mar 11 15:58:35 CST 2016 $
// $Copyright: Copyright (C) 2014-2016 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#include “F2837xS_device.h“ // F2837xS Headerfile Include File
#include “F2837xS_Examples.h“ // F2837xS Examples Include File
/*
* Set the resolution and signalmode for a given ADC. This will ensure that
* the correct trim is loaded.
*/
void AdcSetMode(Uint16 adc Uint16 resolution Uint16 signalmode)
{
Uint16 adcOffsetTrimOTPIndex; //index into OTP table of ADC offset trims
Uint16 adcOffsetTrim; //temporary ADC offset trim
//re-populate INL trim
CalAdcINL(adc);
if(0xFFFF != *((Uint16*)0x0703AC)){
//offset trim function is programmed into OTP so call it
//calculate the index into OTP table of offset trims and call
//function to return the correct offset trim
adcOffsetTrimOTPIndex = 4*adc + 2*resolution + 1*signalmode;
adcOffsetTrim = (*GetAdcOffsetTrimOTP)(adcOffsetTrimOTPIndex);
}
else {
//offset trim function is not populated so set offset trim to 0
adcOffsetTrim = 0;
}
//Apply the resolution and signalmode to the specified ADC.
//Also apply the offset trim and if needed linearity trim correction.
switch(adc){
case ADC_ADCA:
AdcaRegs.ADCCTL2.bit.RESOLUTION = resolution;
AdcaRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
AdcaRegs.ADCOFFTRIM.all = adcOffsetTrim;
if(ADC_RESOLUTION_12BIT == resolution){
//12-bit linearity trim workaround
AdcaRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
break;
case ADC_ADCB:
AdcbRegs.ADCCTL2.bit.RESOLUTION = resolution;
AdcbRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
AdcbRegs.ADCOFFTRIM.all = adcOffsetTrim;
if(ADC_RESOLUTION_12BIT == resolution){
//12-bit linearity trim workaround
AdcbRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
break;
case ADC_ADCC:
AdccRegs.ADCCTL2.bit.RESOLUTION = resolution;
AdccRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
AdccRegs.ADCOFFTRIM.all = adcOffsetTrim;
if(ADC_RESOLUTION_12BIT == resolution){
//12-bit linearity trim workaround
AdccRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
break;
case ADC_ADCD:
AdcdRegs.ADCCTL2.bit.RESOLUTION = resolution;
AdcdRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
AdcdRegs.ADCOFFTRIM.all = adcOffsetT
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-07-26 17:27 TjIsolationCubicle\
文件 560 2017-07-26 17:30 TjIsolationCubicle\.ccsproject
文件 23817 2017-07-29 13:05 TjIsolationCubicle\.cproject
目录 0 2017-07-26 17:27 TjIsolationCubicle\.launches\
文件 10415 2017-07-29 19:24 TjIsolationCubicle\.launches\TjIsolationCubicle.launch
文件 848 2017-07-13 08:16 TjIsolationCubicle\.project
目录 0 2017-07-13 08:22 TjIsolationCubicle\.settings\
文件 62 2017-07-13 08:16 TjIsolationCubicle\.settings\org.eclipse.cdt.codan.core.prefs
文件 123 2017-07-13 08:16 TjIsolationCubicle\.settings\org.eclipse.cdt.debug.core.prefs
文件 477 2017-07-13 08:22 TjIsolationCubicle\.settings\org.eclipse.core.resources.prefs
文件 6743 2017-07-31 14:32 TjIsolationCubicle\28377S_FLASH_lnk.cmd
目录 0 2017-07-31 14:22 TjIsolationCubicle\Debug\
文件 68997 2017-07-31 14:22 TjIsolationCubicle\Debug\TjIsolationCubicle.map
文件 474100 2017-07-31 14:22 TjIsolationCubicle\Debug\TjIsolationCubicle.out
文件 315014 2017-07-31 14:22 TjIsolationCubicle\Debug\TjIsolationCubicle_li
文件 1338 2017-07-31 14:21 TjIsolationCubicle\Debug\ccsObjs.opt
目录 0 2017-07-13 08:22 TjIsolationCubicle\Debug\lib\
文件 289 2017-07-29 13:06 TjIsolationCubicle\Debug\lib\subdir_rules.mk
文件 458 2017-07-29 13:06 TjIsolationCubicle\Debug\lib\subdir_vars.mk
文件 7429 2017-07-31 14:21 TjIsolationCubicle\Debug\makefile
文件 346 2017-07-29 13:06 TjIsolationCubicle\Debug\ob
目录 0 2017-07-29 13:34 TjIsolationCubicle\Debug\source\
文件 28187 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_Adc.obj
文件 7379 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_Adc.pp
文件 1572 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_CodeStartBranch.obj
文件 5889 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_CpuTimers.obj
文件 7721 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_CpuTimers.pp
文件 1202 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_DBGIER.obj
文件 50529 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_DefaultISR.obj
文件 7778 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_DefaultISR.pp
文件 55881 2017-07-29 13:34 TjIsolationCubicle\Debug\source\F2837xS_Dma.obj
............此处省略198个文件信息
相关资源
- 双光子过程在超周边重离子碰撞中产
- 使用W→ντ→νa1→π∓
- 戴森-施温格方程在有限球体积中的手
- 介子核Drell–Yan过程和介子中的p
- 映泰Biostar TA870网
- ASUS华硕K45VD|A45VD主板驱动程序 v9.3.0
- 华硕ASUS K42JZ BIOS主板驱动程序 v9.1.1
- ASUS华硕B85主板BIOS驱动程序 官方版
- 完美获取 CPU 的 NUMA节点数、CPU插槽个
- Samsung三星R439-DS系列网卡驱动程序 v
- 索尼SONY VPCM125JC网卡驱动程序 v6.0.14
- 具有可编程环路补偿功能高密度电源
- 工程师经验分享:DCDC模块电源选择参
- 基于可编程的二相线阵CCD驱动电路设
- 西门子PLC S7 300 S7 400 STL编程手册 中文
- 清华同方手写板万能驱动程序
- ASUS华硕a550笔记本电脑网卡驱动程序
- Eclipse编程技术与附CD-ROM光盘
- PCB布线技术---一个布线工程师谈
- 二院型号FPGA 硬件描述语言编程准则
- springboot整合RabbitMQ实现延时队列的两
- Arduino nano 工程文件
- Arduino教程 Lesson 之--自制风扇
- 基于Blackfin 处理器的TFT LCD 驱动设计
- 用Verilog语言写的CPLD和MCU通讯的SPI接口
- 硬盘、固态硬盘实用程序HDTunePro
- 易语言穿越火线辅助程序源码
- Gerber文件的编辑程序
- 2019程序员互联网公司最新面经包含腾
- Sentaurus TCAD 中文教程
评论
共有 条评论