Skip to main content
Graduate II
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??

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 29, 2024
    Graduate II
    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 */