I have spent days studying and trying to achieve simple communications with CAN bus from scratch using stm32f1, but I still have not achieved the desired results and it is difficult to understand and program.
On the other hand, there are CAN bus modules that communicate with a microcontroller by SPI like this: https://www.ebay.com/itm/283953770322?hash=item421cf6af52:g:JHAAAOSwIeVfQ7HI
and there are many libraries to handle these modules, but the official microchip page does not recommend continuing to use the MCP2515.
My Doubt is: What difference is there in using CAN bus from scratch (STM32) than using a separate module? using a stand alone module affects the security of the CAN bus? Should a stand alone module be used in industry?