Skip to main content
Associate III
February 29, 2024
Question

Firmware

  • February 29, 2024
  • 2 replies
  • 1030 views

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??

2 replies

Tesla DeLorean
Guru
February 29, 2024
Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Associate III
February 29, 2024

 

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 */