2017-12-14 05:52 PM
Hi
I have two STM3220G evl boards. I want to have CAN communication between these two boards.
I am running standard CAN network example provided in STM32Cube_FW_F2_V1.6.0.
Jumper settings are as below
JP3 - 2 and 3 (CAN1)
JP10 - 2 and 3 (CAN1)
JP9 - connected to enable load register
CAN cable used is
https://esd.eu/sites/default/files/manuals/CAN-Cable_Datasheet_en_0.pdf
Below are my observations
1. Some times demo works as expected
2. Most of the times HAL_CAN_Transmit() fails and return timeout error. When I check CAN message using logic analyzer I observed that it is showing NAK. Why CAN controller sending NAK? Is there any extra configuration required?
3. Some times HAL_CAN_Transmit() is successful but no receive interrupt on another board.
Has anyone observed same behavior?
Is there any bug in HAL library or issue with my setup? I read on community that F4 HAL had same issue in V1.6 but it has been fixed in V1.7.
Appreciate views and comments.
Thanks in advance.
Sapana
#stm32cube_fw_f2_v1.6.0 #stm3220-g-eval2017-12-14 11:14 PM
Have you checked the CAN signal with a scope ?
> 1. Some times demo works as expected
This sounds like no proper bus termination.
Have you checked the CAN error counters of both nodes ?
PS: Where is the 'Quote' symbol in the editor gone ????
At least I have all-important emoticons ...
2017-12-27 05:59 AM
Hello,
We would inform you that there is a plan to rework HAN CAN driver
in our future releases.
Thank you for your contribution.
Kind Regards,
Imen
2017-12-27 09:34 PM
Thanks Imen for your response.
Can you please help to fix current issue?
When are you planning next release?
Sapana
2017-12-28 12:54 PM
make sure you have different message IDs coming from different boards.
do you have a dongle ?
I purchased a CanDo unit, set it to transmit every 10mS, and worked on the receiver first.
then I worked on the transmitter.
from memory, NAK is implying that you have bus contention ( a message ID issue)