I'm trying to use CAN controller on WGM160P WiFi module and found out that debug port of the controller shares same pins( PF0 & PF2 ). As a result, I was not able to debug the code after flashing the code to the controller. The pin that I'm utilizing for CANRx (PF0) has been used for SWCLK by Debug.
Is there any possible way where I can use CAN controller for message transmission & reception and also Debug the code?
Sorry, I don't think it is possible to use CAN controller for message transmission & reception and also to debug the code.
The PF0 pin is used for CAN controller or for DBG_SWCLKTCK like it is written in table 7.2 page 22 of the WGM160P datasheet.
May be, you could debug your code without the CAN controller usage and after this step to test without debugger the complete code functionalities with the CAN controller.
But I don't know if this has a meaning depending of your software application.
Nevertheless, I hope this could help you.
Best regards, Olivier