完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
TMS320F28335芯片的ADC模块要求在初始化ADC的时候要有5ms 的延时,如果外部输入时钟晶振频率为25MHz,该如何配置各项参数来保证ADC模块正常启动?
|
|
相关推荐
9 个讨论
|
|
|
直接用Delay_us()函数就可以实现。
具体参考Control Suite中提供的ADC初始化例程。 InitAdc(void) [ extern void DSP28x_usDelay(Uint32 Count); // // *IMPORTANT* // The ADC_cal function, which copies the ADC calibration values from // TI reserved OTP into the ADCREFSEL and ADCOFFTRIM registers, occurs // automatically in the Boot ROM. If the boot ROM code is bypassed during // the debug process, the following function MUST be called for the ADC to // function according to specification. The clocks to the ADC MUST be // enabled before calling this function. See the device data manual and/or // the ADC Reference Manual for more information. // EALLOW; SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1; ADC_cal(); EDIS; // // To powerup the ADC the ADCENCLK bit should be set first to enable // clocks, followed by powering up the bandgap, reference circuitry, and // ADC core. Before the first conversion is performed a 5ms delay must be // observed after power up to give all analog circuits time to power up // and settle // // // Please note that for the delay function below to operate correctly the // CPU_RATE define statement in the DSP2833x_Examples.h file must // contain the correct CPU clock period in nanoseconds. // AdcRegs.ADCTRL3.all = 0x00E0; // Power up bandgap/reference/ADC circuits DELAY_US(ADC_usDELAY); // Delay before converting ADC channels ] 自然此时应当有: #define ADC_usDELAY 5000L |
|
|
|
|
|
|
|
uwujjsdfe 发表于 2018-12-14 06:57 不好意思有注意25M的前提。 可以注意一下DSP2833x_Example.h中关于DELAY_US()的定义。 #define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE) - 9.0L) / 5.0L) 当150MHz,程序中定义CPU_RATE=6.67L,也即6.67ns。 您的具体设置我不清楚,当外部晶振是25MHz,相信这个CPU_RATE是多少相信您是能自己算出来的,改成您需要的数就行了 |
|
|
|
|
|
|
|
uwujjsdfe 发表于 2018-12-14 08:04 推荐您再仔细研究一下时钟这部分内容。 150M的CPU频率是由外部晶振(30M)经过PPL的倍频(10倍),再经过PPLSTS分频(1/2)得到的。 Delay_us()函数里定义的CPU_RATE指的也是150Mhz的CPU频率。 而这几个寄存器是跟您设置有关系的,这就是我说的您的具体设置。 再具体的东西您得参考一下数据手册了: http://www.ti.com/lit/ug/sprufb0d/sprufb0d.pdf |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
590 浏览 0 评论
1645 浏览 0 评论
2084 浏览 0 评论
为啥BQ7693003DBTR芯片在和BQ769X0盒子通讯时收不到信号?
1537 浏览 0 评论
DSP 28027F 开发板 XDS100v2调试探针诊断日志显示了 Error -150 (SC_ERR_FTDI_FAIL)如何解决
1376 浏览 0 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
1788浏览 29评论
2816浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
1746浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
1657浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
1676浏览 13评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-11 13:43 , Processed in 0.710315 second(s), Total 52, Slave 45 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3022