微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI无线射频设计 > CC1310内部电压读取用哪个函数或者有什么方法?

CC1310内部电压读取用哪个函数或者有什么方法?

时间:12-23 整理:3721RD 点击:

想读CC1310  LaunchPad的内部电压,用什么方法,有什么函数可以用么?

可以读取下面三个内部信号。

可以参考SDK中的adcbufcontinuous和adcsinglechannel例程,按你的需求调整一下ADC channel就可以了。

* # Supported Internal Signals #
* Below is a table of internal signals that can be measured using the ADC.
* Since we are not connecting to a DIO, there is no DIO to internal signal mapping. The DIO field in the channel lookup table should be marked PIN_UNASSIGNED.
* This table can be used to create virtual channel entries in the ADCBufCC26XX_adcChannelLut table in the board file.
*
* | DIO | Internal Signal CompBInput |
* |--------------------|-------------------------------|
* | PIN_UNASSIGNED | ADC_COMPB_IN_DCOUPL |
* | PIN_UNASSIGNED | ADC_COMPB_IN_VSS |
* | PIN_UNASSIGNED | ADC_COMPB_IN_VDDS |

一种用ADC,精度高点,参考ADC single channel例程

http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC13x0%20SDK%2FExamples%2FDevelopment%20Tools%2FCC1310%20LaunchPad%2FTI%20Drivers%2Fadcsinglechannel%2FTI-RTOS%2FCCS%20Compiler%2Fadcsinglechannel

另外一种方法用Battery monitor,精度低,只有6位ADC

#include <ti\devices\cc13x0\driverlib\aon_batmon.h>

static uint8_t GetBatteryVoltage(void)

{

     // Return the battery voltage loosing some precision to fit in 8 bits

     return (uint8_t)((AONBatMonBatteryVoltageGet()) >> 3);

}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top