完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
继续努力把我们的硬件移植到HARMony 1.07……我们的定制硬件使用PIC32MX695F512L和4个MCP2515 CAN控制器,这些控制器通过一个SPI总线连接到PIC。芯片选择(CS)是由4个输出引脚处理。我正在移植这个硬件来运行FreeRTOS and Harmony。有了一个范围,我已经验证了CS是正确的,时钟和输出数据是正确的。当我读时,我看到时钟脉冲,但是在输入数据线上什么也没有。在这一点上,我不怀疑Harmony或SPI接口,因为我看到了输出数据的正确信号。这似乎是在2515芯片的配置。我发送的命令是:0x0C-CAN_RESET-一个单字节命令,它重置2515芯片并将其置于配置模式。0x02、0x2A、0x03-CAN_WRITE到CNF1寄存器,以将波特率生成器0x02、0x29、0xB1-CAN_WRITE设置到CNF2寄存器,以设置CAN定时参数0x02,0x28,0x05-CAN_WRITE到CNF3寄存器,以设置更多的CAN定时参数0xA0-CAN_RD_STATUS-这是我看到在SPI总线上发送命令的地方,但是当时钟再次脉冲时什么也没有收到。当我使用一个带有地址的ChanxRead命令时,同样的事情也会发生。谢谢,
以上来自于百度翻译 以下为原文 Continuing with the effort to port our hardware to Harmony 1.07... Our custom hardware uses a PIC32MX695F512L and 4 MCP2515 CAN controllers connected to the PIC with a single SPI bus. Chip Select (CS) is handled by 4 output pins. I am porting this hardware to run FreeRTOS and Harmony. With a scope, I have verified that the CS is correct and that the clock and output data are correct. When I do a read, I see the clock pulses, but nothing on the input data line. At this point, I don't suspect Harmony or the SPI interface because I see the correct signals for outgoing data. It seems to be something in the configuration of the 2515 chip. The commands I send it are: 0x0C - CAN_RESET - a single byte command that resets the 2515 chip and puts it in the configuration mode. 0x02, 0x2A, 0x03 - CAN_WRITE to the CNF1 register to set the baud rate generator 0x02, 0x29, 0xB1 - CAN_WRITE to the CNF2 register to set the CAN timing parameters 0x02, 0x28, 0x05 - CAN_WRITE to the CNF3 register to set more CAN timing parameters 0xA0 - CAN_RD_STATUS - this is where I see the command is sent on the SPI bus, but nothing is received when the clock is pulsed again. The same thing happens when I use a CAN_READ command with an address. Any MCP2515 experts out there? Thanks, |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
636浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 20:48 , Processed in 1.151784 second(s), Total 44, Slave 37 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号