资源简介
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个文件信息
相关资源
- OSG 72集视频教程和资料140620
- 2018西门子杯中国智能制造挑战赛逻辑
- 自已写的 自习室预约小程序微信125
- EPSON XP225 xp235 xp245打印机清零软件+教
- 实验三 消息中间件应用开发:Active
- 数据库系统基础教程答案第三版机械
- Remote Desktop Organizer v1.4.7 支持win10
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- E4A无障碍跨程序操作类库(带源码、
- 软考数据库系统工程师复习资料(完
- labview魔方程序
- stm32f407上的两个can发送和接收例程
- 程序员专用字体YaHei.Consolas.1.11b42517
- scratch3.0 源程序(说相声)
- FTP课程设计(服务端+客户端)
- 欧姆龙CP1系列单轴定位PLC程序.cxp
- STM32 2.4G通信例程
- SVR算法程序可运行
- 基于FPGA的sdi视频传输工程(k7_sdi_rx
- Scratch 吃豆人追踪者.sb3
- labview编程软件滤波器以及编写程序设
- Scratch 变脸(将人物图片变成各种各样
- 电力系统潮流计算程序集合
- Python中Numpy库最新教程
- 直流无刷电机方波驱动 stm32 例程代码
- 仿知乎界面小程序源代码
- 郭天祥ARM9视频教程
- IAR-Keygen-2019+附使用教程.zip
- CCSv9链接及安装流程详解
评论
共有 条评论