2024-02-28 11:18 PM
Hii everyone!
We are working on CAN , and MCU is stm32f103
When we are taking output on blue-pill Tx and Rx pin Data is coming
But when are are doing same on custom board data is not showing ,we are uploading same firmware and clock configuration is also same
For testing ,In custom board when we are Toggling Tx and Rx pin of CAN that is PA12 and PA11 with same speed pluses are showing ,we check code and there is also no error.
Can you tell me what is the issue ,why data is not receiving on Tx and Rx pin of custom board??
2024-02-28 11:32 PM
Present schematic of custom board.
Present code.
Dupe. https://community.st.com/t5/stm32-mcus-boards-and-hardware/firmware/m-p/643718#M17375
2024-02-28 11:43 PM - edited 2024-02-29 12:10 AM
code inside while loop
HAL_CAN_AddTxMessage(&hcan, &TxHeader, TxData, &TxMailbox);
HAL_Delay(500);
Code before while loop
/* USER CODE BEGIN 2 */
HAL_CAN_Start(&hcan);
HAL_CAN_ActivateNotification(&hcan, CAN_IT_RX_FIFO0_MSG_PENDING);
TxHeader.DLC=8;
TxHeader.ExtId=0;
TxHeader.IDE=CAN_ID_STD;
TxHeader.RTR=CAN_RTR_DATA;
TxHeader.StdId=0x103;
TxHeader.TransmitGlobalTime=DISABLE;
TxData[0]=0x01;
TxData[1]=0x02;
TxData[2]=0x03;
/* USER CODE END 2 */