CAN_DeInit(); //缺省模式
CAN_StructInit();
CAN_InitStructure.CAN_TTCM = DISABLE;
CAN_InitStructure.CAN_ABOM = DISABLE;
CAN_InitStructure.CAN_AWUM = DISABLE;
CAN_InitStructure.CAN_NART = DISABLE;
CAN_InitStructure.CAN_RFLM = DISABLE;
CAN_InitStructure.CAN_TXFP = DISABLE;
CAN_Mode = CAN_Mode_Normal;
CAN_SJW = CAN_SJW_1tp;
CAN_BS1 = CAN_BS1_4tp;
CAN_BS2 = CAN_BS2_3tp;
CAN_Prescaler = 0;
CANInit(&CAN_InitStructure);
后面的设置把前面的缺省设置覆盖了?那写缺省设置有什么好处? |