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.

RTOS: TM4C129ENCPDT Bootloader + SysCtlReset



Tool/software: TI-RTOS

Hello,

I would like to reset my device in some case using SysCtlReset but the device is using bootlader for ethernet update with reset vector:

/* ================ Hwi configuration ================ */
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
m3Hwi.resetVectorAddress = 0x00004000;

My problem is the SysCtlReset is not seems to work. I am using XDS100v2 debugger but on other project where the reset vector is not set the function call works nice.

Thank you for your help. 

  • Hi Daniel,

    Can you give more information on what the vector table is like in the bootloader and in the application? Where are you trying to call SysCtlReset...bootloader or application?

    Todd
  • Hey,

    Thank you for your reply.

    The first situation when I would like to call SysCtlReset is when my device lost its IP address. In a multi switched network a dhcp server may be removed. I can detect this event when I lost the IP in the hook function.

    void netIPAddressHook(IPN IPAddr, uint IfIdx, uint fAdd){
    
        IPN IPTmp;
    
        if (fAdd) {
            xdc_runtime_System_printf("CustomHook : Network Added: ");
        }
        else {
            xdc_runtime_System_printf("CustomHook Network Removed: ");
            System_printf("Resetting Device\n");System_flush();
            HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ;
        }
    
        // Print a message
        IPTmp = ntohl(IPAddr);
        xdc_runtime_System_printf("If-%d:%d.%d.%d.%d\n", IfIdx,
                (UINT8)(IPTmp>>24)&0xFF, (UINT8)(IPTmp>>16)&0xFF,
                (UINT8)(IPTmp>>8)&0xFF, (UINT8)IPTmp&0xFF);
    
        System_flush();
    
    }

    As you can see above. 

    regarding the bootloader I am using the standard boot_emac_flash from the example code of dk-tm4c129 device with vector table address of 0x4000.

  • This line: 

    HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | NVIC_APINT_SYSRESETREQ;

    is taken from the boot_emac_flash example code. As I saw this line resets the device and starts custom firmware. This line was replaced with 

    SysCtlReset();

  • I think it is working now. If I program the flash-based bootloader starting from 0x00 and the app to location 0x4000 it working as expected. I think the problem in my case was the bootloader was missing.

    Thanks,