2024-03-24 09:33 AM - last edited on 2024-03-24 10:12 AM by SofLit
I have a STM32F303 connected to a L9616 as displayed below.
The pullup resistor R3 is not present any more. Please ignore it.
Vdd is 3.3V but, as can be seen, I have set Vs to 5V, believing that was necessary to make the CAN BUS work.
With an oscilloscope channel connected between CAN_BUS_H and GND I can see a Tx pulse train, but STM32 HAL reports state 2 and error 43 (0x2B) after transmission. If I understood well, this means 0x20 + 0x10 + 0x1 which leads me to believe that the following three errors are occurring:
#define HAL_CAN_ERROR_EWG (0x00000001U) /*!< Protocol Error Warning */
#define HAL_CAN_ERROR_FOR (0x00000010U) /*!< Form error */
#define HAL_CAN_ERROR_ACK (0x00000020U) /*!< Acknowledgment error
Besides that reported error, the most annoying fact is that I tried many ways to fire the Rx Callbacks on another node with similar configurations, without success.
When investigating the problem I measured, on the reception node, CAN_TX at 3.3V and CAN_RX at 5V. I believe this 5V at CAN RX is, somehow, blinding STM32 from the Rx transceiver signal.
Can you help me with some information? Or could you please share a proved working connection diagram between STM32 and L9616 with me?
Best regards,
Hering
Solved! Go to Solution.
2024-03-26 05:45 AM
2024-03-26 05:49 AM - edited 2024-03-26 05:49 AM
Your HSE Bypass configuration is correct.
2024-03-31 03:17 PM
Hello @SofLit,
Substituting the L9616 for the MCP2561 solved the reception problem. The 8 byte sequence sent by one module is received correctly by the other module. Also, the transmission and reception callbacks are being fired, which is much much better than what I had before. Thanks a lot for helping with that!
But the module that is sending the message is reporting error 4129, or 0x1021, or:
#define HAL_CAN_ERROR_EWG (0x00000001U) /*!< Protocol Error Warning */
#define HAL_CAN_ERROR_ACK (0x00000020U) /*!< Acknowledgment error */
#define HAL_CAN_ERROR_TX_TERR0 (0x00001000U) /*!< TxMailbox 1 transmit failure due to transmit error */
I'm going to verify the bitrate and set it to a standard value to see if the error stops.
Thanks again for your kind help.
2024-04-01 12:03 AM
Hello,
Thank you for the feedback.
I'm closing this thread as the transceiver issue has been solved. Now the issue is something else . You can open a new thread for this.