请问一下,只要运行到红 {MOD}处就HardFault_Handler是怎么回事啊。
static uint8_t CAN_Send_Msg(uint8_t* msg,uint8_t len)
{
uint16_t i=0;
hcan.pTxMsg->StdId=0X12;
hcan.pTxMsg->ExtId=0x12;
hcan.pTxMsg->IDE=CAN_ID_STD;
hcan.pTxMsg->RTR=CAN_RTR_DATA;
hcan.pTxMsg->DLC=len;
for(i=0;i<len;i++)
hcan.pTxMsg->Data=msg;
if(HAL_CAN_Transmit(&hcan,10)!=HAL_OK) return 1;
return 0;
}
一周热门 更多>