//can3
SIUL2.MSCR[88].B.SSS = 1; /* Pad PF8: Source signal is CAN3_TX */
SIUL2.MSCR[88].B.OBE = 1; /* Pad PF8: Output Buffer Enable */
SIUL2.MSCR[88].B.SRC = 3; /* Pad PF8: Maximum slew rate */
//SIUL2.MSCR[89].B.IBE = 1; /* Pad PF9: Enable pad for input - CAN3_RX */
SIUL2.MSCR[703].B.IBE = 1; /* Pad PF9: Enable pad for input - CAN3_RX */
SIUL2.IMCR[191].B.SSS = 4; /* CAN3_RX: connected to pad PF9 */
SIUL2.MSCR[PF12].R = 0x02000000;/* Configure GPIOs as output */
SIUL2.GPDO[PF12].R = 1; /* CAN3STB */
SIUL2.MSCR[PC6].R = 0x02000000; /* Configure GPIOs as output */
SIUL2.GPDO[PC6].R = 1; /* CAN3SHDN */
Hi,Now I am using CAN3 ISR.In order to configure CAN TX RX Pins,
SIUL2.MSCR[89].B.IBE = 1; /* Pad PF9: Enable pad for input - CAN3_RX */
SIUL2.MSCR[703].B.IBE = 1; /* Pad PF9: Enable pad for input - CAN3_RX */
which code is right?
Hi,
configuration of CAN3 RX should be following:
SIUL2.MSCR[89].B.IBE = 1; /* Pad PF9: Enable pad for input - CAN3_RX */
SIUL2.IMCR[191].B.SSS = 4; /* Pad PF9: Enable pad for input - CAN3_RX */
You cannot use construction SIUL2.MSCR[703], because maximal index of MSCR is 263. Look at the header file in your project.
But if you count index for IMCR register, you have to take number from documentation. CAN3RX has number 703 in documentation (please look at the figure below) and subtract number 512. Result is number 191, which is used in IMCR index in the code above.
Correct IMCR index you can also find in Input Muxing tab in IO_Signal_Description_and_Input_multiplexing_tables
I know, it is little bit complicated, so I hope my description is clear. If not, please write me back.
Regards,
Martin