A simple example of CAN bus communications between two STM32 microcontrollers using the updated HAL API functions.
Commented code of the main.c file and stm32f4xx_it.c interrupt file to go along with this video: https://www.youtube.com/watch?v=ymD3F0h-ilE&t=924s
Disclaimer: This code is not mine. I simply copied, uploaded, and commented it for others convenience.