Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TM4C123GH6PM: USB library, opening usblib.lib + help with the USB controller

$
0
0

Part Number: TM4C123GH6PM

Hello everyone,

I would like to learn the USB protocol and practicing on my microcontroller.

I have installed the tivaware usb library, and I'm reading the .c and .h files in order to understand how it works. However there is an important file that I can't open : usblib.lib.

Where can I find this file in the .c format?

By the way, can someone help me to get started with the USB controller? Here is my initialisation:

void USB_init(void)
{
	SYSCTL_RCGCUSB_R |= SYSCTL_RCGCUSB_R0;			// enable usb module clock
	SYSCTL_RCGCGPIO_R |= SYSCTL_RCGCGPIO_R3; 		// enable GPIO Port D clock (PD4 = D-, PD5 = D+)
	// wait for 3 system clock cycles
	__asm("NOP");
	__asm("NOP");
	__asm("NOP");
	GPIO_PORTD_AFSEL_R |= (BIT_4 | BIT_5);							// enable alternate functions for PD4-5
	GPIO_PORTD_DEN_R &= ~(BIT_4 | BIT_5);								// disable digital function for PD4-5
	GPIO_PORTD_AMSEL_R |= (BIT_4 | BIT_5);							// disable the analog isolation circuit for PD4-5
	return;
}

After initializing the USB controller, I am polling the USB_TXIS register to see if I received a SETUP command from the host (enumeration start):

if(USB0_TXIS_R != 0)
		{
			led_off(RED);
			led_on(GREEN);
		}

but nothing happens, what did I miss?

Thank you for your help.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>