2023-11-30 01:32 PM
Dear reader,
I am trying to get the CAN peripheral on my STM32-NUCLEO board working. To start off i wanted to test the loopback mode before I hooked up my transceiver circuit.
Heres my init code for the can peripheral generated by CubeMX:
Heres my CAN MSPinit code:
Heres my main where im attempting to send a messaeg through the peripheral:
I also used the CAN Bit Time Calculation (can-wiki.info) to find the correct settings for my CAN perpheral aswell as shown here:
And this is the output from my logic analyzer, i of course checked that the bit rates matched aswell:
The callback function to receive messages is never called as the RX pin on the CAN peripheral is always high, im very stumped by this and have seen various tutorials online and cant figure out if im missing something.
Any help would be greatly appreciated!
2023-11-30 02:51 PM
You haven't shown any CAN filter configuration
2023-12-01 01:24 AM
Hi Karl!
Thankyou for the reply, my filter settings:
My aplogies I didnt think these were important at this stage as I was trying to get my transmission working from the peripheral first.