如题,有用过这款
芯片的烧友吗?
现在用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总是与总线连接不上
是不是哪些细节没有弄清楚,望指教,不胜感激!!
一周热门 更多>