I'd like to use the CANopen SDK demo that comes with MCUXpresso (for the EVKMIMMXRT1060) but I would like to change the peripheral from FLEXCAN_2 to FLEXCAN_1. What are all the steps i need to do to change the demo code to output the CAN signals from the FLEXCAN_1 peripheral? Specifically, I'd like to use these two pins:
CAN1TX---GPIO_AD_B1_08
CAN1RX---GPIO_AD_B1_09
Please advise me as to all the steps I would need to do to configure this peripheral and get CAN signals out of it.
I've already modified the BOARD_InitPins() function in the pin_mix.c file and added these commands:
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B1_08_FLEXCAN1_TX, /* GPIO_AD_B0_14 is configured as FLEXCAN2_TX */
1U); /* Software Input On Field: Force input path of pad GPIO_AD_B1_08 */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B1_09_FLEXCAN1_RX, /* GPIO_AD_B0_15 is configured as FLEXCAN2_RX */
1U); /* Software Input On Field: Force input path of pad GPIO_AD_B1_09 */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B1_08_FLEXCAN1_TX, /* GPIO_AD_B1_08 PAD functional properties : */
0x10B0u); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B1_09_FLEXCAN1_RX, /* GPIO_AD_B1_09 PAD functional properties : */
0x10B0u); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */
What else do I need to do?
Hi Ahmed,
This seems to be a duplicated thread. Please check https://community.nxp.com/thread/531205
Regards,
Felipe