2023-03-26 11:56 PM
Hello dear friends,
It's been a week since I worked on the CAN transceiver and couldn't make it work. I have set up the chip rcc, bit rate, and receive interrupt of CAN, set the receive filter, and the receiver id in transmission, with no success. I have used only a single board and connected Tx to Rx (PB8 PB9) through a jumper. I have checked that there is some signal on the Tx line with a voltmeter(Sadly I have no oscilloscope now to check the absolute signals.)
What I am looking for is that I can get the receive interrupt.
I am not going to use the software loop-back mood since I'm not going to use simulation.
The code is attached. Help me what had make it not
Solved! Go to Solution.
2023-03-29 01:22 PM
Please don't PM me related to forum postings.
You can't connect the pins in that fashion, the bus needs to see its own signal, and to do that you need a transceiver or diode arrangement. You need a second device on the bus to respond to the first. It needs to acknowledge.
https://www.keil.com/appnotes/files/apnt_236.pdf
2023-03-28 02:40 AM
Hello @Vahid Ajallooeian
Could you provide more details about the issue? Hardware Setup would be useful to investigate further! Since, you couldn't generate the receive interrupt, you can take a look at the example provided for CAN networking. STM32CubeF4/Projects/STM324xG_EVAL/Examples/CAN/CAN_Networking at master · STMicroelectronics/STM32CubeF4 (github.com)
If the loopback is working fine, you should suspect the transceiver for not receiving the message.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-03-29 01:00 PM
Dear @F.Belaid
I have not used any transceiver, but I have directly connected the PB8 of the F407 discovery board to the same board PB9. I expected to get the interrupt signal when the transmission is completed. yet no interrupt signal thrown occurred. sad. Moreover the example code you are referring to is not compatible with My board.
2023-03-29 01:22 PM
Please don't PM me related to forum postings.
You can't connect the pins in that fashion, the bus needs to see its own signal, and to do that you need a transceiver or diode arrangement. You need a second device on the bus to respond to the first. It needs to acknowledge.
https://www.keil.com/appnotes/files/apnt_236.pdf
2023-03-30 11:13 AM
@Community member Sorry for the inconvenience happened.
@F.Belaid I have two other custom boards, one of them features a STM32F429BIT6 and the other one features a STM32f429IGT6. Both of them have sn65hvd230 transceivers. In the debug mode, I see that the RXM bit of MSR is low. Which sequence or conditions should happen so that this bit becomes high? it seems another one three years ago has encountered this problem.