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.

AWR1642: awr1642 reset time and timing

Part Number: AWR1642
Other Parts Discussed in Thread: IWR1642, UNIFLASH

hello everyone:

      I have realized the program update with the sbl of sdk3.0, after code being load into RAM, copy the interrupt vector into the address 0 and software reset the MSS, it will jump to my application code and run. But i test the load code time (load application code into RAM) by I/O pin, it takes 130ms. And jump to execute the application main, it takes 1000ms(between software reset and the application main running).

     in my product, it requirements the time between power up and run application code must less than 80ms. How can i do?

thank you very much!

  • Hi,
    Let me check boot up time internally and get back to you.

    Regards,
    Jitendra
  • Hi,

    I have measured SBL bootup to application switch timing and it is around 65 mSec.

    To measure the timing I'm toggling GPIO_1 in SBL and application's main function where toggle event I'm capturing from the Logic analyzer.

    Here is the code snippet I have added in SBL (mmWave SDK 3.1) and mmw demo (SDK 2.1) main function.

    int main (void)
    {
    int32_t errCode = 0;

    /* Initialize the GPIO */

    GPIO_init();

    Pinmux_Set_OverrideCtrl(SOC_XWR16XX_PINJ13_PADAC, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR16XX_PINJ13_PADAC, SOC_XWR16XX_PINJ13_PADAC_GPIO_1);

    GPIO_setConfig (SOC_XWR16XX_GPIO_1, GPIO_CFG_OUTPUT);
    GPIO_write (SOC_XWR16XX_GPIO_1, 1U);
    while(errCode++ < 100);
    GPIO_write (SOC_XWR16XX_GPIO_1, 0U);

    Regards,

    Jitendra

  • thanks for your testing, I have tested my time again, I found the time between SBL_main and mss_main is about 1000ms always. You can see my sbl_main and mss_main code in the picture.

     in the third picture,the green line is the NRST, the yellow line is the GPIO2 siganl, the scale is 200ms/div. from the first toggle to the second toggle, it takes 1200ms. I test the time base on sbl of SDK3.0.0.8 and mss_main of SDK2.0.0.4, and run the code in IWR1642 demo EVM. How do you think about the result?

    I am looking forward to your replying, thank you very much!

  • hello, Jitendra Gupta:
    I know the reason, in my product, i want to download the sbl.bin and demo.bin into the flash by uniflah in first time. The first imag file in the uniflash will be loaded into 1st 512KB of the flash and the second image will be loaded into 2nd 512KB.(I know this by another title in the E2E) so i modify the SBL_METAIMAGE_OFFSET to 512*1024 in the sbl.h. When i restore the value to 256*1024, the time is same as your test.
    1.Can tell me difference and why?
    2.The time beween reset disassert and mss_main is more then 120ms, how can i do?
    3.If i must use the SBL_METAIMAGE_OFFSET with 512*1024, how can reduce the time?
    thank you very much!
  • Hi,
    Even I tried SDK 3.0.0.8 version of SBL with both offset 256 and 512KB and in case of 512KB used Uniflash to flash both of binaries (SBL+App).
    I see same time (~65mSec) on logic analyzer for both of the offset value and yes you need to place app image at the corresponding sFlash offset.

    Could you confirm that in the SBL along with GPIO code addition you have disabled UART option to download image to flash (in my case I have disabled this option), else UART may wait for user input.

    #if 0
    do
    {
    retVal = SBL_transportRead((uint8_t*)&userInput, 1U);

    /* Check if user interrupted the autoboot */
    if (retVal == 1U)
    {
    metaimageUpdate = 1;
    SBL_printf ("\r\nDebug: Update Meta Image selected\r\n");
    }
    else
    {
    SBL_printf (" %d", autoboot--);
    continue;
    }
    }while((retVal == 0) && (autoboot != 0));
    #endif


    Regards,
    Jitendra
  • of course, i download the code into flash by uniflash(SBL and my APP).
    but i execute qspi, qspiflash initialization and SBL_imageLoad() before the while loop, and modify 'while((retVal == 0) && (autoboot != 0)' to 'while(SBL_ERROR_STATUS)' (if load failed, stay in the loop, or continue to reset). then the time is 1300ms.
    I have no idea about this. why?
    thank you
  • To measure the boot up and switching time please do the same change what is recommended
    e2e.ti.com/.../2838860 : Add this GPIO code needs to be added in the main function of SBL and app at the first without any other task.
    e2e.ti.com/.../2840029 : disable this code to skip the while loop totally.

    I don't think it has some other issue, you need to check your code change and measure the boot up time. We have already measured it to the no. we had mentioned here.

    Regards,
    Jitendra
  • thank you for replying and sorry for delaying because holiday, I know the reason.
    in the while loop, the SBL_transportRead call UART_read, and in the UART_read there is a semaphore_pend(WAIT_FOREVER), the "WAIT_FOREVER" is 0xFFFFFFFF, so there is about 1000ms time to finish the "do... while"
    any way, thank you very much