Tool/software: Code Composer Studio
Hi TI:
1. usb
I put the USB module of TM4C123GH6PZ into device mode using USB_EP_1 and USB_EP_2 both IN and OUT;
what is the endpoint num for host to indentify these endpoints?
is (USB_EP_1*2 + 0) for TX and (USB_EP_1*2 + 1) for rx ?
2. I open the two can interfaces of TM4C123GH6PZ,to initialize them i use the following code:
Is this code correct?
can0 and can1 has the pin definition as GPIO_PE4_CAN0RX, GPIO_PE5_CAN0TX, GPIO_PB4_CAN0RX, GPIO_PB5_CAN0TX, does this definition refer to can0 and can1?
void
CANInit(uint8_t CanIndex)
{
if(0x0 == CanIndex){
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
GPIOPinConfigure(GPIO_PE4_CAN0RX);
GPIOPinConfigure(GPIO_PE5_CAN0TX);
GPIOPinTypeCAN(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5);
SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN0);
CANInit(CAN0_BASE);
}else if(0x1 == CanIndex){
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIOPinConfigure(GPIO_PB4_CAN0RX);
GPIOPinConfigure(GPIO_PB5_CAN0TX);
GPIOPinTypeCAN(GPIO_PORTE_BASE, GPIO_PIN_4 | GPIO_PIN_5);
SysCtlPeripheralEnable(SYSCTL_PERIPH_CAN1);
CANInit(CAN1_BASE);
}
.......
}
Thanks