MC33905高速CAN/LIN接口芯片,技术请教
时间:10-02
整理:3721RD
点击:
如题,有用过这款芯片的烧友吗?
现在用xep100操作
这是我写的初始化程序
SPI0BR = 0x01; //4/4=1M
SPI0CR1 = 0x54;
SPI0CR2 = 0x40;
DDRM_DDRM3 = 1;
PTM_PTM3 = 1;
PTM_PTM3 = 0;
spi0_SendRvOneword(0x5040); //misc
spi0_SendRvOneword(0x4A17); //reg
spi0_SendRvOneword(0x4DC2); //wdog
spi0_SendRvOneword(0x4F00); //lin i/o
spi0_SendRvOneword(0x5a00); //wdog refresh
spi0_SendRvOneword(0x5e55); //regular init
spi0_SendRvOneword(0x61c0); //can cofig
spi0_SendRvOneword(0xe100); //can clear
spi0_SendRvOneword(0x5a00); //wdog refresh
PTM_PTM3 = 1;
个人觉得没什么问题,但我的can总是与总线连接不上
是不是哪些细节没有弄清楚,望指教,不胜感激!
现在用xep100操作
这是我写的初始化程序
SPI0BR = 0x01; //4/4=1M
SPI0CR1 = 0x54;
SPI0CR2 = 0x40;
DDRM_DDRM3 = 1;
PTM_PTM3 = 1;
PTM_PTM3 = 0;
spi0_SendRvOneword(0x5040); //misc
spi0_SendRvOneword(0x4A17); //reg
spi0_SendRvOneword(0x4DC2); //wdog
spi0_SendRvOneword(0x4F00); //lin i/o
spi0_SendRvOneword(0x5a00); //wdog refresh
spi0_SendRvOneword(0x5e55); //regular init
spi0_SendRvOneword(0x61c0); //can cofig
spi0_SendRvOneword(0xe100); //can clear
spi0_SendRvOneword(0x5a00); //wdog refresh
PTM_PTM3 = 1;
个人觉得没什么问题,但我的can总是与总线连接不上
是不是哪些细节没有弄清楚,望指教,不胜感激!
已调试通过,有兴趣的朋友可以交流
我在配置这个芯片的时候也遇到问题了,现在的情况是这个芯片完全不鸟我的配置命令,如果不发喂狗,它就一直256ms复位一次,发0X2580读芯片的ID回的数据也根本不对。
头都要大了~~~
请问下能帮我发下你的调试通过的例程吗?非常感谢 q842598368.
遇到同样问题,你是怎么解决的?请教!