This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Tiva Launchpad & Bootloader confusion

Other Parts Discussed in Thread: TM4C123GH6PM, TM4C123GH6PGE, LM3S811

When you plug the Launchpad into a PC it exposes the ICDI DFU interface and a serial port.

However if you then open LM flash programmer and look for a DFU device, no such device is visible.

Also there is no communication via the serial port.

I then loaded the boot_usb example from tivaware into the launchpad and ran it. Again, LM FLash does not detect a DFU device.

Next I loaded the boot_serial example from tivaware into the launchpad and ran it. Again, LM FLash cannot communicate with the serial port.

This leads to the question, does the ICDI prevent me from using the serial/USB ports as intended? Do I have to wait until I have my own Tiva based board (sans ICDI) to develop  my bootloader code?

  • David Henry52307 said:
    Next I loaded the boot_serial example from tivaware into the launchpad and ran it. Again, LM FLash cannot communicate with the serial port.

    boot_serial works with boot_demo1 and boot_demo2. You should be able to load boot_serial at address 0x0 using UART interface of LM Flash Programmer.

    Just to make sure you have no problem loading .bin to your Launchpad, load a know working example program like blinky, and see if it works.

    - kel

  • If I open LM flash then configure as 'Quick Set' as TM4C123G Launchpad, I have no trouble loading binaries.

    If I configure Quick Set to Manual then set Interface to UART, COM3, 115200 baud and try to program, I get a "fail to establish communication"error. Note my UART is via the USB cable which is connected to UART0 via the ICDI. Pins A0/A1 are not exposed on the Launchpad so I can't connect my own TTL/UART converter.

    Similarily if I set Interface to USB DFU, no device is discovered.

    My boot_serial/boot_usb code comes from the Tivaware 2.1.0.12573  package. In that package all projects are setup for the TM4C123GH6PGE processor. My Launchpad has the TM4C123GH6PM variant. It shouldnt make any difference, expecially for UART0. However I was careful that software project options were updated to reflect the correct processor.

    Again, is the ICDI getting in the way?

  • Hi David,

         My mistake at my earlier reply. I don't have a setup to re-verify this. But, from what I remember, you need to have a serial flash loader loaded first at your Tiva MCU before you are able to load any program using serial interface. This are the steps below for serial flash loading using boot_serial and boot_demo1.

    1. Load boot_serial at address 0x0 using ICDI interface

    2. Load boot_demo1 at you set address besides 0x0 (e.g. 0x2000), using serial interface.

    - kel

  • Hi,

       See, detailed instructions below by TI Sue how to try boot_serial and boot demo1.

       How boot loader works?

    - kel

  • Hi Kel,

    This is exactly what I'm doing. I configured bl_config.h to use Launchpad switch SW1 (PF4) as the force update check.

    To ensure that CheckForceUpdate() returns true, I inserted a line to turn on the blue led at the appropriate point. This is common for both boot_serial and boot_usb.

    I've checked all of bl_config.h, the Launchpad has a 16MHz crystal which matches CRYSTAL_FREQ. 

    UART_FIXED_BAUDRATE is set and UART_AUTOBAUD unset.

    Is your experience based on your own Tiva based board? Have you tried this on a Launchpad?

    I'm missing something basic but what? This should be a trivial exercise.

    David

  • Hi David,

         I have tried the boot_serial and boot_demo1 using my Stellaris EK-LM3S6965 kit before. I have not yet tried boot_serial and boot_demo1 at my Tiva Connected Launchpad, as those programs are not in the examples program at my Tivaware copy for Tiva Connected Launchpad. But boot_serial and boot_demo1 should work for Tiva Launchpad with modification at bl_config.h file and linker file.

    - kel

  • Kel,

    Thanks. I've got an LM3S811 buried somewhere. I'll dig it out and try that. Thanks for the help.

    David

  • Kel,

    I finally sorted it out. The first thing is that the micro-B connector on the Launchpad is NOT a USB device. The micro-A/micro-B connecter is the device.

    I discovered that by loading the usb-dev-bulk example and expecting to see it pop up in Windows Device Manager (which it didn't).When I relocated the USB cable from the Debug connector to the Device connector and slid the power selector from Debug to Device, lo and behold, a Stellaris Bulk Device appeared in Device Manager.

    Obvious when you think about it, another example of 'When all else fails, read the manual'.

    Next step was using the correct sources. I have 3 versions of Tivaware sources, version 1.1 which is aimed at the DK_TM4C123G board , 1.0 &  2.1.0.12573 which are aimed at the EK_TM4C123GXL Launchpad. Version 1.1 had a boot_usb example project whereas1.0 & 2.1.0.12573 have the boot loader sources but no project file.

    I created a project file in 2.1.0.12573 based upon 1.1. Reading the Launchpad Users Guide showed me that USB DP pin is at PD5 and DM pin at PD4. Using that I updated the bl_config.h file, built the boot_usb demo. Relocated the cable from Debug to Device, slid the power selector over and, bingo, the Stellaris Firmware Update device appeared in Device Manager.

    Now I can use LM Flash Programmer to program the Lauchpad.

    I'm using the BL_CHECK_UPDATE_FN_HOOK option to call the bootloader from an application.  Pressing SW1 writes a keyword to eeprom and then invokes the bootloader. The BL_CHECK_UPDATE_FN_HOOK function reads eeprom and looks for the keyword. If present the USB interface is opened and it enters the update process, else it loads the application.

    My remaining problem is that I have to press the reset button after pressing SW1 to get the booloader running. Apart from that all is OK.

    David