完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
主要目标是将ADC值发送到CAN-BUS。
我参加了SPC570xx_RLA CAN测试应用程序发现 修改引脚设置: 在main.c中我尝试初始化并使用ADC: 没有ADC代码CAN示例工作正常。 但如果我尝试访问ADC-regs,系统崩溃: 在SAR_ADC_12BIT_B0.xxxxx = x命令之后,系统始终保持在_IVOR1。 我的硬件是SPC570S-DISP-Board。 我错了什么? #adc#spc570s#spc570s-adc 以上来自于谷歌翻译 以下为原文 Main target is to send an ADC-value to the CAN-BUS. I took the SPC570xx_RLA CAN Test Application for Discovery Modified Pin Settings: in main.c I tried to initialize and use the ADC: Without ADC-code CAN example works fine. But if I try to get Access to the ADC-regs, System crashes: The system always stays at the _IVOR1 after SAR_ADC_12BIT_B0.xxxxx = x command. My hardware is the SPC570S-DISP-Board. What do I wrong? #adc #spc570s #spc570s-adc |
|
相关推荐
3个回答
|
|
你好迈克尔,
它似乎是SARADC Section& amp; s上的头文件问题。文档。 根据RM,地址0xFFE3c000是RESERVED,IVOR1是逻辑的。 你能用SAR_ADC_12BIT_0替换SAR_ADC_12BIT_B0(参见xpc570s.h)吗? 无论如何,我正在为这个不一致的头文件提交一个ER。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Michael , it seems to be a header file issue on SARADC Section & Documentation. the address 0xFFE3c000 is RESERVED and IVOR1 logical according the RM. Could you replace SAR_ADC_12BIT_B0 by SAR_ADC_12BIT_0 (cf xpc570s.h)? Anyway , i am submitting an ER for this inconsistent header file. Best regards Erwan |
|
|
|
对不起,我的参考手册版本不是最后一本(修订版6 RM0349)
表12在rev 3上不正确。 在与专家核实后。 这是答案。 '问题与主管ADC的错误地址无关( SAR_ADC_12BIT_B0 ),但它与时钟门控有关。 每次驱动器启动(xxx_lld_start)时,都会写入正确的PTCL寄存器,以便将时钟门控到外设。使用未包含在spc5studio中的驱动程序时 访问寄存器之前要做的第一个操作是使用该函数对时钟进行门控,否则会产生IVOR1。 SPCSetPeripheralClockMode(PCTL NUMBER,(SPC5_ME_PCTL_RUN(2)| SPC5_ME_PCTL_LP(2))); 在这种情况下,PCTL NUMBER为 SAR_ADC_12BIT_B0 是112(RM中的表658)。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Sorry , i was on a bad revision of the reference manual not the last one (Revision 6 RM0349) Table 12 was not correct on rev 3. after checking with expert. here is the answer. 'The problem is not related to wrong address of the supervisor ADC ( SAR_ADC_12BIT_B0 ), but It is related to clock gating. Every time a driver is start (xxx_lld_start) the correct PTCL register is written in order to gate the clock to the peripherals. When using a driver not included in spc5studio The first operation to do before accessing register is to gate the clock using the function, otherwise IVOR1 is generated. SPCSetPeripheralClockMode(PCTL NUMBER, (SPC5_ME_PCTL_RUN(2) | SPC5_ME_PCTL_LP(2))); In this case the PCTL NUMBER for SAR_ADC_12BIT_B0 is 112 (table 658 in the RM).' Best regards Erwan |
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2215 浏览 1 评论
3016 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1588 浏览 1 评论
3405 浏览 6 评论
5730 浏览 21 评论
747浏览 4评论
1109浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
383浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1094浏览 3评论
1143浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-5 01:43 , Processed in 1.331623 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191