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.

TDA3XEVM: IPU crashes on any memory acces (read and write)

Part Number: TDA3XEVM

Hello,

I'm working with the GP Prime device TDA3xx. The board crashes when I try to access the memory via the HW_RD.

I'm trying to read the value from the 32kHz clock:

timerVal = HW_RD_REG32(SOC_COUNTER_32K_BASE + COUNTER_32K_CR);

The processor locks on this line.

When trying step through this line in the CCS I get

Cortex_M4_IPU1_C0: Can't Run Target CPU: (Error -1268 @ 0x1090001) Device is locked up in Hard Fault or in NMI. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00007) 

I'm pretty confused why this happens.

Thank you,

  • Hi

    From the document I came to know that  "GP  Prime  devices  allow  JTAG  access  to  be  closed  at  boot-time"

    Refer the below document for more information.

    vision_sdk/docs/FeatureSpecificUserGuides/VisionSDK_UserGuide_Security_Devices.pdf

    Thanks

    Gaviraju

  • I've added a line that enables the JTAG but that doesn't solve the issue

    int main(void)
    {
        SecurityLib_enableJtag();
        uint32_t           isTesocEnabled = FALSE;
        /* For test automation, SBL Library Init Params are not needed which
         * disables
         * SBL prints*/
    #if !(defined (SBL_TEST_AUTO_BUILD))
        sbllibInitParams_t sblInitPrms;
        /* Default initialization of SBL Lib Params */
        SBLLibInitParamsInit(&sblInitPrms);
        /* Assign SBL Params */
        sblInitPrms.printFxn = &SblPrint;
        sblInitPrms.printHexNumFxn = &SblPrintHexNum;
        sblInitPrms.getcFxn = &SblGetChar;
        sblInitPrms.putcFxn = &SblPutChar;
        sblInitPrms.getNumFxn = &SblGetNum;
        sblInitPrms.getHexNumFxn = &SblGetHexNum;
        SBLLibInit(&sblInitPrms);
    #else
        SBLLibInit(NULL);
    #endif
    
        /* Do initial configuration needed before IPU TESOC tests */
        SblConfigPreIPUTESOC();

    This is the code that comes with the security module of the PDK (sbl_tda3xx_main.c). It crashes when reaching the SblConfigPrelPUTESOC(). That function calls SBLUtilsRead32KTimer() and that one actually reads the memory. The processor fails on the line that reads the value.

    The SecurityLib_enableJtag() also accesses memory but very rarely fails... weird...

  • Also, stepping through the code with the CCS sometimes makes the code properly read the value... It then fails on different memory access...

  • Hi Michal,

    do you have any modifications in the SBL?

    Usually this read works fine.

    Regards,

    Yordan

  • Well not before the actual fails. Also that doesn't matter because I've tried the same on the SBL built from the PDK:

    $HOME/ti/PROCESSOR_SDK_VISION_03_07_00_00/ti_components/drivers/pdk_01_10_03_07/packages/ti/binary/sbl/qspi/opp_nom/tda3xx-evm/sbl_qspi_opp_nom_ipu1_0_debug.xem4

    Same thing happens.

    One change that I've introduced is changing to "System Reset". Basically the solution from this thread: e2e.ti.com/.../3244218

  • Hi Michal,

    can you try to set VISION_SDK_CONFIG to 1 in TDA3xx_multicore_reset.gel and see if you can debug with CCS?

    Regards,

    Yordan

  • Try with both 0 and 1 (it was already set to 1) but that doesn't change the behavior.

  • Hi Michal,

    Sorry for the confusion.

    Your GP Prime device has JTAG unlocked by default. If it were locked, you wouldn't be able to connect the target in CCS at all.

    Regarding the issue you are facing, when debugging SBL, could you first confirm that you have removed any GEL script so the system is not already initialized?

    Regards,
    Stanley

  • No worries. Thank you for the info. I've solved the issue.

    The problem was that there was a lot of moving parts and I've misunderstood the process.

    In the end, to make it work I've:

    - properly secured the SBL, according to the TI documents
    - loaded the secure SBL (big endian version) to the QSPI memory with offset of 0

    After restarting the board the RBL verified the SBL succesfully and started it. I was starting the SBL by downloading it into RAM. That way it wasn't verified and it couldn't proceed (it 'crashed' on memory access). Since it's a GP Prime device that was obviously not the way to go - the SBL has to be verified by the RBL to be run.

    This document about SBL proved to be very useful.

    Thank you for all your help.