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.

Reset to Bootloader on cc2530

Other Parts Discussed in Thread: CC2530, CC2510

Hi everyone,

after fix my problema (and knowledge) about bootloader on cc2530 it is working ok but I have a new doubt. If I do a reset during my application it reset to my application. I want to try reset to the bootloader again so I forcé a JMP to 0x0000 address and it Works because I can see the led indicators of bootloader BUT it can't receive nothing from the uart.

I think that maybe is a problem with uart interrupts but I don't know. Can I achieve this objective? Can I back to bootloader from the application?

Thanks,

Victor

  • If you want to go back to bootloader, you can do a software reset.

  • Hi YiKai,

    when I do a software reset, is the application that starts inmediatly, not the bootloader.

    Victor

  • Why?  Doesn't it start from bootloader and bootloader will bring up application?

  • I don't think so. The application start too quick so i think that the bootloader is not executed. Maybe the reset vector points to application entry point?

    The bootloader is on 0x0000 address and the App is on 0x2000 address. From 0x2000 to 0x2090 are all the int vectors.

  • If I am not wrong in my knowledge, it should be bootloader running first and it will bring up your application. I would suggest you to make sure it works like this first. Or, do I misunderstand anything?

  • If you are using Onboard_soft_reset then it should reset to the bootloader at 0x0:

    __near_func void Onboard_soft_reset( void )
    {
    HAL_DISABLE_INTERRUPTS();
    // Abort all DMA channels to insure that ongoing operations do not
    // interfere with re-configuration.
    DMAARM = 0x80 | 0x1F;
    asm("LJMP 0x0");
    }

    Can you try the following:

    1. Download the bootloader + application (erase and donwload in bootloader project, then download with no erase in application project)

    2. Open the bootloader project using IAR and select project->debug without download.

    3. Put a break point in the bootloader.

    4. Run until in your application and issue the soft reset.

    You should hit the brake point in the bootloader and be able to debug any UART issues. If not halt and see where the PC is. If it is in your application space then debug your application to see why it did not jump to 0x0.

    The bootloader does not use interrupts so it should not be an issue with UART interrupts.

    Regards, TC.



  • Hi Guys

    I have same issue with the CC2510.

    used asm("LJMP 0x0"); or direct address to main asm("LJMP 0x4c6");

    in both cases the UART is not working.

    1.Checked UARTconfiguration & IO Configuration : OK

    2. Checked DMA : Armed

    3. Got DMAIF goes to HIGH & DMAARM goes to LOW, when received UART Message,but "_Pragma("vector=0x43") __near_func __interrupt void DMA_ISR(void) "  not reached.

    Appreciate any assistance.

    BR.

    David.

  • David,

        The original thread was regarding the ZStack Bootloader, which does not use interrupts or DMA (just UART poll), so I am not sure this is the same issue. Can you raiser the problem you are seeing with DMA ISR after asm("LJMP 0x0"); in a separate thread?

    Regards, TC.

     

  • Hello Victor,

    Did you try TopCat's suggestions?

    To add a point from my side, the bootloader waits for some time before jumping to the application. Check if this "wait-time" is enough for your requirements.  if not, you need to change the bootloader sources, build and flash it to the controller.

  • Solved by using Watchdog:

    See this thread.

    http://e2e.ti.com/support/wireless_connectivity/f/964/p/342339/1196869.aspx#1196869

    BR.