How can I resolve the "CAN: Failed to send frame" error in my ATmega2560 ?

Hey friends, I have been trying to implement a real-time control system for automotive applications using an ATmega2560 microcontroller, an MCP2515 CAN controller, and Zephyr OS, while integrating a Bosch BMP280 sensor for pressure data. Still, however, I have been faced with an error of failing to send CAN frames? Despite setting up the SPI peripheral and initializing the CAN controller and BMP280 sensor, I encountered the error "CAN: Failed to send frame." If the implementation is successful, the output should log a message indicating that the CAN frame has been successfully sent. Attached is my code snippet
attachment 0
4 Replies
ZacckOsiemo
ZacckOsiemo•2mo ago
what would cause that error 🙂 thats what you need to investigate and in this situation your stack trace is more helpful than your code
Dtynin
Dtynin•2mo ago
I see, how would you advise I navigate through it? because I've ensured that the CAN network is correctly set up and there are no bus errors.
techielew
techielew•2mo ago
@ZacckOsiemo @Dtynin did you guys get this resolved?
ZacckOsiemo
ZacckOsiemo•2mo ago
@techielew the error being reported here is ‘it doesn’t work’ too ambiguous
Want results from more Discord servers?
Add your server