Hi,
I'm trying to use MCAL 4.3.1 to use FlexCAN. I'm using MPC5748G. I have made the configurations on EB Tresos 24.0.1.
I confuse about this parameter of FlexCAN_0_CAN0RX:
PortPinPcr
Description: Used to specify port configuration register: SIUL I/O Pin Multiplexed Signal
Configuration Registers (MSCR number).
Range: >=0 and <=263.
But in file: IO_Signal_Description_and_Input_Multiplexing_Tables_Rev6.xlsx (attached in MPC5748G Reference Manual):
Port | LVDS Pair Port | SIUL MSCR# | MSCR SSS | Function | Module | Description | Direction |
PB[1] | 17 | 0000_0000 | GPIO[17] | SIUL2 | I/O | ||
PB[1] | 0000_0001 | E0UC_31_Y | EMIOS0 | O | |||
PB[1] | 0000_0010 | E2UC_5_Y | EMIOS2 | O | |||
PB[1] | - | WKPU[4] | WKPU | I | |||
PB[1] | - | CMP0_3 | CMP0 | I | |||
PB[1] | 543 | 0000_0010 | E0UC_31_Y | EMIOS0 | I | ||
PB[1] | 589 | 0000_0010 | E2UC_5_Y | EMIOS2 | I | ||
PB[1] | 700 | 0000_0010 | CAN0RX | FlexCAN_0 | I | ||
PB[1] | 712 | 0000_0001 | LIN0RX | LIN_0 | I |
=> SIUL MSCR number of FlexCAN_0_CAN0RX is 700 (Port PB[1]). It's out of range (>263).
So, how should I use the correct number of MSCR in this case?
Best Regards,
Thuan Le
Solved! Go to Solution.
Hi,
to set PB1 as CAN0RX two registers need to be configured; set IBE bit of respective MSCR register and put right SSS value into IMCR register, i.e.
SIUL2.MSCR[17].B.IBE = 1; /* Pad PB1: Enable pad for input */
SIUL2.IMCR[700-512].B.SSS = 2; /* CAN0_RX: connected to pad PB1 */
How this is done in Tresos, not sure.
BR, Petr
Hi,
substract 512 from given value, thus 700-512.
BR, Petr
Hi Petr,
Thank for your support.
But in the file "IO_Signal_Description_and_Input_Multiplexing_Tables_Rev6.xlsx", the maximum value of SIUL MSCR is 1020 (for port PD[15]). I think 1020-512 out of range too (>263).
Best Regards,
Thuan
Hi,
to set PB1 as CAN0RX two registers need to be configured; set IBE bit of respective MSCR register and put right SSS value into IMCR register, i.e.
SIUL2.MSCR[17].B.IBE = 1; /* Pad PB1: Enable pad for input */
SIUL2.IMCR[700-512].B.SSS = 2; /* CAN0_RX: connected to pad PB1 */
How this is done in Tresos, not sure.
BR, Petr