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.

AM5708: RTOS Boot

Part Number: AM5708
Other Parts Discussed in Thread: AM5718,

Hello, experts

After SBL_main() starts to run, when it gose trough the function 'SBL_Configure_AVS(oppMode == 0)', Board_getIDInfo() function which is in idkAM571x_info.c returns 'boardInfo', but it dosen't seem right, because, for example, boardInfo.boardName is '         ; 31 4](  I' (0x4035F43C).

So anyway, you get 0 (BOARD_UNKNOWN) as a returning value from SBL_GetBoardid().

and then, in the SBL_GetOppConfig() function, pOppTable sets as NULL, because boardId is 0.

It causes the process get sidetracked to exception.

To avoid this, I set boardId as 0x3U (BOARD_IDKAM571x).

And then, I got the messages below, going around below.

pPmicData->pmic_write(pPmicData->slave_addr, vcores->core.addr, offset_code) 

bool Board_SetPMICVoltage(uint32_t slaveAddr, uint8_t regAddr, uint8_t value) {

...

status = I2C_transfer(handle, &i2cTransaction); <== here!!

}

CortexA15_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. 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.4.0.00006)
CortexA15_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. 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.4.0.00006)
CortexA15_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. 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.4.0.00006)

The point of the question is

1. it seems wrong boardInfo from EEPROM. How can I get proper one?

Or, How can I provide proper PMICData for?

  • Hi,

    Can you run EEPROM diagnostic test available at <PDK>\packages\ti\board\diag\eeprom\src using CCS and check if you are getting proper values?

    Regards,
    Parth

  • Hi,

    No, I can't. I mean I don't know how to the test using CCS.

    Can you please tell me how I can do that?

    Of course, I'm going to try to find out while wating for your answer.

  • Can you run EEPROM diagnostic test available at <PDK>\packages\ti\board\diag\eeprom\src using CCS and check if you are getting proper values?

    Below is the result of running eeprom_test() (not eeprom_test_v2.c)

    *********************************************

    * EEPROM Test *

    *********************************************

    Invalid Board ID Info Header!!

    header: ffffffff

    boardName: 

    version: 

    serialNum: 

    Test FAILED!

    ======================================

    I've tried to run the same code to idkevm571x board and gotten right results, for example, boardName is 'AM571IDK'.

    What do I have to do now?

    Do I have to put proper data into the custom board's EEPROM?

  • Hi,

    By default it should have been there. Did you modify anything with respect to the eeprom?

    Do you have any other board with you? Can you try the same on another board?

    Also, can you write the proper values in the eeprom and try?

    Regards,
    Parth

  • By default it should have been there. Did you modify anything with respect to the eeprom?

    No, I didin't, but I will check if someone did before I do this.

    I've just checked and no one did.

    Do you have any other board with you? Can you try the same on another board?

    I have 3 of the same custom boards and a idkevmAM5718 board.

    3 custom board put the same empty results as I mentioned, while AM5718 puts proper result.

    Also, can you write the proper values in the eeprom and try?

    For now, I don't know how to write in eeprom, but if necessary, I need you tell me about it. Please.

    As mentioned above, I've ever changed the value of 'deviceid' as 0x3U after it took 0x0U as a result when the SBL code processed.

    The value of 'deviceid', 0x03U means BOARD_IDKAM571x, as you know, but it actually dosen't work.

    I'v gotten error messages below.

    CortexA15_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. 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.4.0.00006)
    CortexA15_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. 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.4.0.00006)
    CortexA15_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. 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.4.0.00006)

    And, I don't even know what would be the proper values for our AM5708 custom board.

  • Hi,

    The value of 'deviceid', 0x03U means BOARD_IDKAM571x, as you know, but it actually dosen't work.

    I'v gotten error messages below.

    Can you try following:
    Put a breakpoint after pPmicData->pmic_write(pPmicData->slave_addr, vcores->core.addr, offset_code) using a while loop as discussed in the previous thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1117055/am5708-rtos-boot. Make sure you remove the while loop from beginning of the SBL. Hardcode the device ID to 0x03 as you are already doing. Run the SBL as usual and then try to connect using CCS and see if you are able to connect.

    Regards,
    Parth

  • Results based on running conditions:

    Condition 1.

    - while loop atfer the pmic_write() function code.

    - running order.

      1. Run the device with or without JTAG and wait for a while.

      2. And then, connect JTAG.

      3. Connect to A15 without GEL files.

    Result:

    Error connecting to the target:
    (Error -1170 @ 0x0)
    Unable to access the DAP. 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.4.0.00006)

    CS_DAP_DebugSS: Error connecting to the target: (Error -1170 @ 0x0) Unable to access the DAP. 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.4.0.00006) 

    Condition 2.

    - while loop atfer the pmic_write() function code.

    - running order.

      1. Run the device with JTAG.

      2. And then, connect JTAG immediatly.

      3. Connect to A15 with GEL files.

    Result:

    Begin at:

    0003b1d4:   6883                ldr        r3, [r0, #8]

    or

    0003a4e2:   6B02                ldr        r2, [r0, #0x30]

    or

    0003f48e:   F8D20230            ldr.w      r0, [r2, #0x230]

    or

    0003f360:   F8D10230            ldr.w      r0, [r1, #0x230]

    Halted at:

    0003808c:   EAFFFFFE            b          #0x3808c

    or

    0003808a:   FFFEEAFF           .word       0xfffeeaff

    Or sometimes:

    Error connecting to the target:
    (Error -1170 @ 0x0)
    Unable to access the DAP. 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.4.0.00006)

    CortexA15_0: Trouble Halting Target CPU: (Error -1321 @ 0xFFFFFFFF) Device failed to enter debug/halt mode because security settings prevent debug. Power-cycle the board. If error persists, confirm configuration and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.4.0.00006) 

    Condition 3.

    - while loop atfer the pmic_write() function code.

    - running order.

      1. Run the device with JTAG.

      2. And then, connect JTAG immediatly.

      3. Connect to A15 without GEL files.

    Result:

    Error connecting to the target:
    (Error -1170 @ 0x0)
    Unable to access the DAP. 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.4.0.00006)

    Or sometimes:

    Begin at:

    0003a126:   6B41                ldr        r1, [r0, #0x34]

    Halted at:

    0003808a:   FFFEEAFF           .word       0xfffeeaff

    Condition 4.

    - while loop from beginnig of the SBL.

    - running order.

      1. Run the device with or without JTAG and wait for a while.

      2. And then, connect JTAG.

      3. Connect to A15 without GEL files.

    Result:

    Begin at:

    403310cc:   E5923000            ldr        r3, [r2]  // the while loop

    End with error:

    CortexA15_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. 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.4.0.00006)

    Especially, I've had the SBL code run step by step.

    Condition .

    - while loop from beginnig of the SBL.

    - running order.

      1. Run the device with or without JTAG and wait for a while.

      2. And then, connect JTAG.

      3. Connect to A15 without GEL files.

      4. Run the sbl.out which has while loop atfer the pmic_write() function code.

    Result:

    Beginning halted at:

    403310cc:   E5923000            ldr        r3, [r2]  // the while loop

    Load the sbl.out at the time.

    The sbl.out starts with main() that is at:

    403310dc:   E16D41F0            strd       r4, r5, [r13, #-0x10]!

    It gose:

    main();

    SBL_Configure_AVS(oppMode);

     pPmicData->pmic_write(pPmicData->slave_addr, vcores->core.addr, offset_code); 

    = bool Board_SetPMICVoltage(uint32_t slaveAddr, uint8_t regAddr, uint8_t value) // in 'pmic_device.c' from '\idk571x\device\'

    status = I2C_transfer(handle, &i2cTransaction);

    = int16_t I2C_transfer(I2C_Handle handle, I2C_Transaction *transaction) // in 'I2C_drv.c'

    status = handle->fxnTablePtr->transferFxn(handle, transaction);

    =static int16_t I2C_transfer_v1(I2C_Handle handle, I2C_Transaction *transaction) // in 'I2C_v1.c'

    retVal = I2C_primeTransfer_v1(handle, transaction);

    = static int16_t I2C_primeTransfer_v1(I2C_Handle handle, I2C_Transaction *transaction)) // in 'I2C_v1.c'

     

    At the time, object->writeCountIdx is 2.

    while(object->writeCountIdx != 0U)
    {
        /* wait for transmit ready or error */
        while((I2CMasterIntRawStatusEx(hwAttrs->baseAddr,
            I2C_INT_TRANSMIT_READY) == 0U) &&
            (I2CMasterIntRawStatusEx(hwAttrs->baseAddr,
            I2C_INT_ARBITRATION_LOST | I2C_INT_NO_ACK |
            I2C_INT_ACCESS_ERROR | I2C_INT_STOP_CONDITION ) == 0U))
            {
            }

        errStat=I2CMasterIntRawStatusEx(hwAttrs->baseAddr,
            I2C_INT_ARBITRATION_LOST | I2C_INT_NO_ACK |
            I2C_INT_ACCESS_ERROR);

        /* if we get an error, do a stop and return failure */
        if (errStat != 0U)
        /* if we get an error, do a stop and return failure */
        {
            fatalError=1U;
            break;
        }
        /* write byte and increase data pointer to next byte */
        I2CMasterDataPut(hwAttrs->baseAddr, *(object->writeBufIdx)); <== 2nd time dead.
        (object->writeBufIdx)++;

        /* clear transmit ready interrupt */
        I2CMasterIntClearEx(hwAttrs->baseAddr, I2C_INT_TRANSMIT_READY);

        /* update number of bytes written */
        object->writeCountIdx--;
    }

     

    End with errors:

    CortexA15_0: Can't Single Step Target Program: (Error -2134 @ 0x0) Unable to control device execution state. 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.4.0.00006)
    CortexA15_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. 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.4.0.00006)
    CortexA15_0: JTAG Communication Error: (Error -1170 @ 0x0) Unable to access the DAP. 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.4.0.00006)

    Regards,

  • Hi,

    There are some changes required in the SBL to boot AM570x board, which might be causing these changes. Please follow the steps given in  section 10.7 of the document https://software-dl.ti.com/processor-sdk-rtos/esd/docs/05_03_00_07/rtos/How_to_Guides.html#porting to make the required modifications.

    Regards,
    Parth