今天调试CAN,用PA11、PA12,波特率设置成250kb,怎么也无法和外面通讯? 但CAN_Mode_LoopBack自发自收是可以的,CAN_Mode_Normal模式,和外面的CAN通讯无法进行!不知何故?是波特率设置问题,还是硬件问题,还是软件问题?寻求支持!
CAN_InitStructure.CAN_Mode=CAN_Mode_Normal;//CAN_Mode_LoopBack;
CAN_InitStructure.CAN_SJW=CAN_SJW_1tq;
CAN_InitStructure.CAN_BS1=CAN_BS1_8tq;
CAN_InitStructure.CAN_BS2=CAN_BS2_7tq;
CAN_InitStructure.CAN_Prescaler=2;
CAN_Init(CAN1,&CAN_InitStructure);
|