2025-02-12 01:01 AM - last edited on 2025-02-12 01:18 AM by SofLit
Tested CAN on STM32h723ZGT6 using internal clock i.e., HSI ,which is working fine. When I tried to test it using external clock i.e., HSE with same configuration I am unable to get data on BUS-Analyzer. When I try to transmit the data, the data is able to store in the RAM and even transmit handler is hit. But unable to get data on BUS.
I am using crystal oscillator with 12MHz frequency, baudrate 500k, clock frequency to CAN is 8MHz and all the remaining configurations are as seen in the image below.
Thank you and best Regards,
Aashritha V.
2025-02-12 01:19 AM
Hello,
Need to check again your bitrate when you switched from HSI to HSE.
PS: it's not recommended to use HSI for CAN communication.
2025-02-12 02:26 AM
LED, SPI are working with external clock. There is only issue with CAN.
HSE is ON in the driver generated even then I am getting issue in transmission. I am able to transmit but unable to get on BUS.
2025-02-12 02:33 AM
1- Please use </> button to paste the code instead of sharing screen shots. See this link.
2- Sorry I didn't understand, are you using CubeMx to generate the configuration or are you coding the config yourself? if the second case, I suggest you to generate the code with CubeMx, test it, if it's OK, you can inspire from the register configuration from the HAL.