Other Parts Discussed in Thread: TM4C123GH6PM, EK-TM4C123GXL
Tool/software: Code Composer Studio
I have read all of the available material to try and get the TM4C123GH6PM processor on my REV A EK-TM4C123GXL development board into USB DFU mode. I am using the code below and I am able to compile and load the sw using CCS. However, when I plug the eval board in using the device port (and switch the PWR SELECT to "DEVICE") and bring up LM Flash Programmer (Build1613) there is no USB DFU device identified. I have confirmed that I can force the board into USB DFU mode using LM Flash to erase the flash. I have tried two different eval boards. I have tried loading the software as a .bin... No dice.
A little more info:
Device does not show up in Device Manager as "Stellaris Device Firmware Upgrade" unless flash is erased by LM Flash Programmer.
I have followed the example code provided for the TM4C129x along with reading and trying what seems to be every possible solution in a half dozen other forum entries.
I have the part as:TARGET_IS_TM4C123_RA3 under Properties > Build > ARM Compiler > Predefined Symbols; in the Pre-defined NAME field. Also in this field I have PART_TM4C123GH6PM
I am running CCS Version: 7.0.0.00043 & TivaWare_C_Series-2.1.4.178
Thanks in advance for any help.
CODE:
#include <stdint.h> // Variable definitions for the C99 standard. #include <stdbool.h> // Boolean definitions for the C99 standard. #include "inc/tm4c123gh6pm.h" // Definitions for the interrupt and register assignments. #include "inc/hw_memmap.h" // Memory map definitions of the Tiva C Series device. #include "inc/hw_types.h" // Definitions of common types and macros. #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "inc/hw_nvic.h" #include "driverlib/usb.h" #include "usblib/usblib.h" #include "usblib/device/usbdevice.h" #include "usblib/device/usbddfu-rt.h" #include "driverlib/sysctl.h" // Definitions and macros for System Control API of DriverLib. #include "driverlib/interrupt.h" // Defines and macros for NVIC Controller API of DriverLib. #include "driverlib/gpio.h" // Definitions and macros for GPIO API of DriverLib. #include "driverlib/timer.h" // Defines and macros for Timer API of DriverLib. #include "driverlib/pin_map.h" //Mapping of peripherals to pins for all parts. #include "driverlib/uart.h" // Definitions and macros for UART API of DriverLib. #include "driverlib/adc.h" // Definitions for ADC API of DriverLib. //#define TARGET_IS_TM4C123_RA3 uint32_t sys_clock; int main(void) { // Configure system clock at 40 MHz. ROM_SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); sys_clock = ROM_SysCtlClockGet(); USBDCDTerm(0); ROM_IntMasterDisable(); ROM_SysTickIntDisable(); ROM_SysTickDisable(); HWREG(NVIC_DIS0) = 0xffffffff; HWREG(NVIC_DIS1) = 0xffffffff; HWREG(NVIC_DIS2) = 0xffffffff; HWREG(NVIC_DIS3) = 0xffffffff; HWREG(NVIC_DIS4) = 0xffffffff; ROM_SysCtlPeripheralEnable(GPIO_PORTD_BASE); ROM_GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_4); ROM_GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_5); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0); ROM_SysCtlPeripheralReset(SYSCTL_PERIPH_USB0); // ROM_GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_4); // ROM_GPIOPinTypeUSBAnalog(GPIO_PORTD_BASE, GPIO_PIN_5); ROM_SysCtlUSBPLLEnable(); ROM_SysCtlDelay(sys_clock/3); ROM_IntMasterEnable(); ROM_UpdateUSB(0); while(1) { } }