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.
Struggled with how to title this post but essentially what I am trying to do is this:
What is currently happening:
// Disable all processor interrupts. HWREG(NVIC_DIS0) = 0xffffffff; HWREG(NVIC_DIS1) = 0xffffffff; HWREG(NVIC_DIS2) = 0xffffffff; HWREG(NVIC_DIS3) = 0xffffffff; HWREG(NVIC_DIS4) = 0xffffffff; // Also disable the SysTick interrupt. ROM_SysTickIntDisable(); ROM_SysTickDisable(); // Return control to the boot loader. ROM_UpdateEMAC(g_ui32SysClock);
Any insight from someone that might already be doing this?
This is my configuration:
I am on the LaunchPad EK-TM4C1294XL (tm4c1294ncpdt) running at 100Mhz, using TI-RTOS 2.0.1.23, NDK 2.23.01.01, and TivaWare 2.1.0.12573c on CCS5.4. I can get an IP on every reboot (now that I have dealt with the emac issues: http://processors.wiki.ti.com/index.php/TI-RTOS_TM4C129_Emac_Issues ). I am on revision A1 and using build 1613 of the LM Flash Programmer tool.
I have read a bunch of threads regarding ethernet update but none seem to really address what I am seeing on my board.
Thanks for the help!
Please consider this a "hail mary" after waiting a long time and no better idea was posted.
I would try to determine how the processor's and mac's state differ from reset, after the bootloader has run. For example you may be able to halt the processor using jtag and examine its state. You may also be able to use jtag to dump the mac registers.
The fix in this case might be to load the mac registers with their default values on startup, or trigger a mac reset on startup, or it may be possible to trigger a full-chip reset. (Only triggered after a bootloader update)
Thanks David.
For now this idea is shelved, I couldn't get much traction on how to move forward. I am trying a different approach now but will eventually come back to this to see if I can get it working. I will definitely use your suggestions, thank you!
I think we're having the same problem with the EK-TM4C1294XL development board. We are following the same steps and running into the same issue, however I don't think it's an Ethernet issue. I don't think the board is being reset at all.
When we connect serially to the board we cannot connect to the updated application, until we do a reset using the reset button on the board. Our application blinks an LED when running, but just as posted above after flashing the updated application the LED remains on.
I tried two of our other projects that both were able to update over Ethernet. One is a simple base project and the other is a slightly more complex project that uses the TM4C129NCPT processor on a custom board.
The project that is failing is now consistently landing at the following:
ti_sysbios_knl_Swi_runLoop__I() at Swi.c:184 0x0001D4DE
To get there I flash the board from CCS, disconnect CCS from the board, run the boot loader Ethernet update, and reconnect to the board from CCS.
Line 184 attempts to refresh maxQ within the do/while block below.
/* * ======== Swi_runLoop ======== */ Void Swi_runLoop() { Queue_Handle curQ, maxQ; Swi_Object *swi; /* Remember current Swi priority */ curQ = Swi_module->curQ; /* refresh maxQ */ maxQ = (Queue_Handle)((UInt8 *)(Swi_module->readyQ) + (UInt)(Intrinsics_maxbit(Swi_module->curSet)*(2*sizeof(Ptr)))); /* * Run all Swis of higher priority than * the current Swi priority. * Will pre-empt any currently running swi. */ do { swi = (Swi_Object *)Queue_dequeue(maxQ); /* remove from curSet if last one in this ready list */ if (Queue_empty(maxQ)) { Swi_module->curSet &= ~swi->mask; } Swi_run(swi); if (Swi_module->curSet == 0) { break; } maxQ = (Queue_Handle)((UInt8 *)(Swi_module->readyQ) + (UInt)(Intrinsics_maxbit(Swi_module->curSet)*(2*sizeof(Ptr)))); } while (maxQ > curQ); }
I found a workaround but I’m not sure why the work around works. My application uses the NDK stack for two TCP/IP sockets and it also uses USB. The USB is based on the sample application USB Bulk so it basically works the same way as the USB Bulk example. I found that after I do the software update using LM Flash with the Ethernet interface, I could talk to the CPU over USB using USB Bulk even though the Ethernet was not working (no ping). Since the USB bulk interface worked, I could change the version in the code, recompile the code, download the code and using the USB interface I could read the new version to confirm I was running the new code. When I did this “testing”, the board would not reply to the ping after the software update. If I reset the board, the board would answer the ping and talk via the sockets as expected and the USB interface also worked. For a quick test, I commented out in the code where I initialize the USB in the startup and after a firmware update, the board would ping as expected following a firmware update. I took a closer look at what I do to the processor before I call ROM_UpdateEMAC() and added one more step to disable the USB device before calling the function ROM_UpdateEMAC() . I also put the call back in to initialize the USB.
As you can see, I added the line USBDevDisconnect(USB0_BASE); to disable the USB device before I call ROM_UpdateEMAC(). Testing has shown that the call USBDevDisconnect(USB0_BASE); fixes something so after a firmware update both USB and the network stack work as expected.
// Disable all processor interrupts.
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
HWREG(NVIC_DIS2) = 0xffffffff;
HWREG(NVIC_DIS3) = 0xffffffff;
HWREG(NVIC_DIS4) = 0xffffffff;
SysTickIntDisable(); // disable the systick interrupt
SysTickDisable(); // stop the systick counter
USBDevDisconnect(USB0_BASE); // disable the USB device before the jump back to boot
ROM_UpdateEMAC(g_ui32SysClock); // Make the call jump to boot so we can download.
The question I have is does that indicate I have a problem lurking in my code that may cause a problem later or calling USBDevDisconnect(USB0_BASE); something I should be doing anyway before I jump to the boot if I am using USB?
Thanks,
Doug
I should add that I am using Code Composer Studio Version 6.1.2, TIRTOS 2.16.0.08, Compiler 5.2.7 and XDC tools 3.31.1333.
Doug