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.

updating firmware from ROM lib issue. Running TI RTOS

environment:

IDE:CCS V 5.5

MCU: Stellaris LM3S9B96

Running RTOS with NDK

I tried to updated firmware using ROM_UpdateEthernet() function in ROM. I wrote the code as following:

void FirmwareUpdate (void)
{
// Set the clocking to run from the PLL at 50 MHz
// ROM_SysCtlClockSet( SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ );

// Disable all processor interrupts.
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;

ROM_SysTickIntDisable();
ROM_SysTickDisable();

//
// Clear any active interrupts. If the boot loader uses any
// interrupts, they will therefore respond as expected.
//
HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_VECT_CLR_ACT;

ROM_UpdateEthernet(ROM_SysCtlClockGet());
}

This function is executed inside a Task. 

I configured LM Flash Programmer with with correct MAC addr. and then opened Tera Term and typed the cmd to update the firmware. The LM Flash Programmer starting programming. It is a good sign. However, It stopped during programming for some reasons. I believe some other Tasks crashed the programming. 

I also tried use BIOS_exit(0) before FirmwareUpdate(). However, the FirmwareUpdate() wont execute. 

Is there any solutions to successfully update firmware via Ethernet?

Thanks

madoka

Regards

  • It can successfully running ROM_UpdateEthernet() without RTOS. it programs chips using LM Flash Programmer. 

    with RTOS and NDK, I call FirmwareUpdate() function within a task. The LM flash Programmer starts programming. However, it always stops for some reasons. I guess it is BIOS cause it stops.

    then I execute BIOS_exit(1) after check firmware update command. therefore, if we receive firmware update command, it will normally terminate BIOS. I also registered FirmwareUpdate() function in System_atexit() handler; so, when BIOS_exit(1), the program counter go to FirmwareUpdate(). I debugging step by step. after BIOS_exit, the program execute FirmwareUpdate(). However, the LM Flash Programmer always attempt connecting. The boards sent out BOOTP request, and the LM reply it. however, the TFTP never start. 

    Please helps on this. I have been struggling for days. any ideas.

    So appreciated

  • Hi Madoka,

    What version of SYS/BIOS and Stellaris/Tivaware are you currently using for development?

    Thanks,

    -- Emmanuel