Skip to main content
Visitor II
November 21, 2019
Question

error code-38 when starting FD-CAN

  • November 21, 2019
  • 3 replies
  • 1518 views

Hi,

I'm trying to transmit some data using FD-CAN but HAL_FDCAN_Start() function returns error code 38. I have taken reference from STM32H743-EVAL kit example.I have configured same as mentioned there. But still i couldn't figure out the issue behind it.

Thanks,

Vimal

    This topic has been closed for replies.

    3 replies

    VPrasAuthor
    Visitor II
    November 22, 2019

    Hi,

    that issue is solved, Tx fifo/queue was not allocated into RAM area, Now my tx fifo is not getting cleared after transmission of message,

     /* Retrieve the Tx FIFO PutIndex */

       PutIndex = ((hfdcan->Instance->TXFQS & FDCAN_TXFQS_TFQPI) >> FDCAN_TXFQS_TFQPI_Pos);

       /* Add the message to the Tx FIFO/Queue */

       FDCAN_CopyMessageToRAM(hfdcan, pTxHeader, pTxData, PutIndex);

       /* Activate the corresponding transmission request */

       hfdcan->Instance->TXBAR = ((uint32_t)1 << PutIndex);

       /* Store the Latest Tx FIFO/Queue Request Buffer Index */

       hfdcan->LatestTxFifoQRequest = ((uint32_t)1 << PutIndex);

    also i'm not seeing any data after transmission, what could go wrong for unsuccessful transmission?

    how do i proceed further, someone please help me!

    Thanks,

    Vimal

    VPrasAuthor
    Visitor II
    November 22, 2019

    issue is solved..there was a placement issue in crystal oscillator

    Visitor II
    January 6, 2022

    can we run FDCAN without using external oscillator

    Visitor II
    December 12, 2023

    How did you fix the error?