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

TM4C129DNCPDT: Bootloader using USB COM/Serial Port

$
0
0

Part Number: TM4C129DNCPDT

Hello everyone,

I'm using a TM4C129DNCPDT. One of the requirements of our project is to provide our users with the ability to update our firmware from the RS-232 port (UART0), the USB port (USB0), and a wireless module that resides on UART1. Because we need to perform updates on UART1, we can't use the ROM-based bootloaders. Instead, I've been modifying the boot_serial example to serve our needs. Also, because our back-end software is set up to communicate over a COM port with the USB, I'd prefer that the USB operate as a COM/serial port (CDC) to keep things simple on the software side (it's old code, with no support for USB devices implemented or DFU, just serial ports).

Configuring the UART ports in the boot_serial demo went smoothly, but the USB has been giving me trouble for a while now. My main problem at the moment is that when I plug in the USB cable, no devices show up in the Device Manager. The window refreshes, suggesting that Windows recognized that a device was connected to it, but no new COM Ports show up, nor do any new devices under the Universal Serial Bus controllers section. A few seconds later, the Device Manager window refreshes a second time. I haven't been able to see if anything new appears, but certainly not in those two sections.

I felt like I had exhausted all my options, so I decided to start a new project that ran from a main (unlike the boot_serial example that runs from ResetISR), and I followed the CDC example provided by Ralph Jacobi in the following thread:

https://e2e.ti.com/support/microcontrollers/other/f/908/t/670258

This code, merged with the boot_serial code that's involved in reprogramming the flash, worked almost perfectly. The computer recognized the USB serial port, and I could perform a code update through the LM Flash Programmer using the COM port that was created from the USB CDC. The only problem I ran into was when the bootloader tried to jump to the main application. I was getting a FaultISR. I'm not entirely sure why, but I'm guessing it had to do with two 'main's in the Flash.

Going back to the modified boot_serial example, I've been comparing all the USB-related registers in both projects, to see if they are the same. And from what I can tell, the important ones are the same (like running from PLL or not, VBUS, ID, DP, and DM enabled, USB0 actually powered, etc). The USB CDC structures in the code are also set up the same way, and I'm calling the same functions between both projects. Yet for the project that runs from int main(), I get a USB COM port. For the project that runs from the ResetISR, I don't get a COM port.

I've run out of ideas as to what could be causing problems. I know I've written a lot in this post, but is there anything that I may have overlooked that could be causing this problem?

- Tom


Viewing all articles
Browse latest Browse all 262198

Trending Articles



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