I am working on the CAN driver implementation and found the driver is not able to transmit data on the BUS.PLease find the debug findings below:
- Cantransmit function is writing Data and ID to register and setting transmit request (verified the register).
- Verified the error register (C2EFL) and found following error bits are set.
- Arbitration lost
- Stuff error
- Bus line error
- I am using CANoe (CANcase XL hardware) simulation set up.
- When I short the CAN_L and CAN_H bus off interupt us happening.
- Verified the Pin Configuration and looks fine (Configured as CAN Tx and Rx)
CAN buad rate : 500kbps.
Reception is also not happening.I am sending one frame CANoe at 100ms.
Please advice me how to proceed further.
I really appreciate quick response.
Please let me know if you need any more additional info.
Thanks in advance!!!
Did you check the RSCAN sample in the RH850/F1L starter kit ?
There is also a Renesas App-Note about RSCAN.
Have you connected terminal resistor(120 ohm), because the CanCaseXL doesn't have terminal resistor setup by default
In reply to gopish:
Thank you for your reply!
Yes, I am using 120 ohm resistor with DB9 connector to connect with CANcaseXL.
Below I have attached the wave form at the micro controller Tx pin after initialisation (no Tx request placed)
Here the 5 consecutive receive bit is having time period of 67 micro seconds and the stuff bit (1 dominant) is having time period of 5 microseconds.
Here my question is in case of normal working CAN driver, for the 5 recessive bits should have time period of 10 micro second and stufff bit should have time period of 2 micro second for 500 kbps buad rate. ?
Looking forward for your comment.
In reply to Fragero:
Thank you for sharing the links.
I haven't gone through this.Since using the vector stack directly started with development.
Will go through these samples.Mean while can you please comment on the wave attached in reply to Mr.Gopi ?