2024-11-27 04:11 AM
Hi,
I am working on STM32F302K8 and would like to use it's CAN Bus to communicate between devices both as master and slave It is my first time using STM32CubeIDE and the HAL library and implementing CAN Bus on my work. I did use some samples scattered around the internet but I couldn't get the CAN bus working not even finishing the initialization. I have attached my sample program with bare minimum just USART to check the sequence of the init() function and couple of GPIO outputs for the LEDs.
2024-11-27 04:46 AM - edited 2024-11-27 05:15 AM
Hello @Rey and welcome to the community,
Before going ahead with analysis, could you please tell about your CAN hardware configuration?
1- How are you connecting the two devices? are you using CAN transceivers?
2- Are you adopting this exact structure?:
transceivers+ terminating resistors.
If you are using transceiver, could you please provide its part number?