Hi,
Why I'm not able to get CAN to work in PF0? I'm able to change the PF0 to normal GPIO output and also to PWM port but I can't get the CAN working. Or at least I don't get any messages or get any interrupts for sending something. The initialization, receiving and sending works with other pins (I have made the code first for launchpad CAN0 PE4,PE5) for CAN0 and also for CAN1.
// Enable CAN0 pins PF0 and PF3 ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); // Enable CAN peripheral ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0); // Enable port PF0 for CAN0 CAN0RX // First open the lock and select the bits we want to modify in the GPIO commit register. // GPIO_PORTF_LOCK_R = GPIO_LOCK_KEY; GPIO_PORTF_CR_R = GPIO_PIN_0; // Enable CAN ROM_GPIOPinConfigure(GPIO_PF0_CAN0RX); // Lock the pin GPIO_PORTF_LOCK_R = 0; ROM_GPIOPinTypeCAN(GPIO_PORTF_BASE, GPIO_PIN_0); // Enable port PF3 for CAN0 CAN0TX ROM_GPIOPinConfigure(GPIO_PF3_CAN0TX); ROM_GPIOPinTypeCAN(GPIO_PORTF_BASE, GPIO_PIN_3); // Enable CAN peripheral ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0); // Initialize the CAN controller. ROM_CANInit(CAN0_BASE); // Set up the bit rate for the CAN bus. ROM_CANBitRateSet(CAN0_BASE, ROM_SysCtlClockGet(), baudrate); // Enable interrupts on the CAN peripheral. ROM_CANIntEnable(CAN0_BASE, CAN_INT_MASTER | CAN_INT_ERROR | CAN_INT_STATUS); // Enable the CAN interrupt on the processor (NVIC). ROM_IntEnable(INT_CAN0); // Enable the CAN for operation. ROM_CANEnable(CAN0_BASE);
What I'm doing wrong? Is there somthing missing? I'm using TM4C123AH6PM controller.
BR
JHi