Update:
Before I changed the MCP_CAN_lib, I remapped the default SPI to use SPI2 pins, as it is 5 volt tolerant
Code: Select all
SPI.setMOSI(PB15);
SPI.setMISO(PB14);
SPI.setSCLK(PB13);
AND IT WORKED!
Now the weird part:
Yesterday I started to use the WONDERFUL HID Bootloader (
https://github.com/Serasidis/STM32_HID_Bootloader), however the program wouldn't start.
I added a Serial.print("Hello!") right after setup() and a while(1).... The program would upload as normal, but nothing would show on the serial monitor.
I loaded the example ASCII table program and it uploaded and printed as it should.
Once again, I tried the program that uses the MCP_CAN_lib and it uploaded. Nothing printed.
Thinking there might be a conflict between my code and the bootloader, I switch over to USB to TTL programming
AND IT WORKED!
I hope my experience is helpful to others.