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.

AM2434: Load program error during board bring-up

Part Number: AM2434


Hi Expert,

We started working on first real board for our product (nothing flashed in a new xSPI NOR flash) .

As a first step, we checked JTAG connection using "Test Connection" with .ccxml in CCS. It was a success. And then we just executed a “debug session” in CCS. We used the same target config file used in AM243xEVM since our real board is using the same AM2434 AVL as EVM. In this step, we found an error shown like below,

Target failed to write 0x00000000

In our real board, we set boot mode like this, Primary boot mode is xSPI, and backup boot mode is UART. This is almost the same with EVM.

In the first test, when this error happened, we found some logs came out through UART like this “5020200000010000000100CCCCCCCCCCCCCCCCCC“. In my understanding, this means the processor is in the state of the UART boot mode.

So, in the second test, we just removed the backup boot setting register from the array of boot mode registers in PCB. Then nothing came from UART but still, the same error happened.

 

The root cause is unclear to me, and from my understanding, SBL_NULL bootloader is not required for JTAG operation on this board bring-up, but want to confirm this with you as well. I think there would be some steps and CCS scripts for board bring-up with JTAG but I was not able to find the information yet in TI documents. 

For board bring-up, should I set "NO boot mode" instead of xSPI boot mode, and use "load_dmsc.js" as an initialization script of the target configuration? I think this is a way since there is no code in nor flash in the board. please correct me if this is a wrong approach.

 

To clarify checkpoints and the root cause, and fix the issue as soon as possible, I need TI expert’s help and guidance.

I would appreciate it if you share any checkpoints or experiences on this issue.

Regards,

Moonil

  • For board bring-up, should I set "NO boot mode" instead of xSPI boot mode, and use "load_dmsc.js" as an initialization script of the target configuration? I think this is a way since there is no code in nor flash in the board. please correct me if this is a wrong approach.

    Hi Moonil,

    You are correct. Since your board start with empty xSPI flash, you should set to no boot mode, so that the CCS "load_dmsc.js" will load the system firmware and using GEL file to set the PLL and release each core from reset, so that the JTAG can connect to target and load the code to on-chip memory for execution.

    You can also use the UART boot mode to flash the SBL_NULL into your xSPI flash.

    Best regards,

    Ming

  • Hi Ming,

    I would like to cross-check my configuration with you about using load_dmsc.js as an initialization script.

    1) To run load_dmsc.js before loading the program, the target configurations are configured in CCS like below.

    2) When trying to start Debug Session, "load_dmsc.js" is executed and then our project program(.out) is loaded as below. but this is not always done, please see the questions below.

    Q1) in the captured image, (1) -> this seems to be an evaluation board configuration. should we run this on our real target? or should I modify "load_dmsc.js" for our product?

    Q2) in the captured image, (2)-> this seems the bit values of the bootmode scribed in AM243x datasheet. could you explain how we can read it and map them to each boot mode bits in the AM243x data sheet? 

    Q3) When I changed some source code and build a version(.out), in some cases, the program loading(.out) continued and was not completed as below (error case 1). and also sometimes "Finish Typpdef 1549 typedefs" was shown (ease 2).

    could you share your experience on this? should I update the specific firmware version of Blackhawk XDS560v2 (USB&LAN) for CCS11 by any chance?

    (error case 1)

    (error case 2)

    I would appreciate it if you share your knowledge and opinion on those questions.

    Regards,

    Moonil

  • Hi Moonil,

    Q1) in the captured image, (1) -> this seems to be an evaluation board configuration. should we run this on our real target? or should I modify "load_dmsc.js" for our product?

    [MW] Yes. The current load.dmsc.js is tailored for AM243x EVM. You should adjust it for your board. For example, your board may not have DDR at all.

    Q2) in the captured image, (2)-> this seems the bit values of the bootmode scribed in AM243x datasheet. could you explain how we can read it and map them to each boot mode bits in the AM243x data sheet? 

    [MW]     bootMode = dsMCU1_0.memory.readWord(0, 0x43000030) & 0x78; in gel file will get the bootmode settings for you. You can also read the register 

    CTRLMMR_MAIN_DEVSTAT (0x43000030), bit 0-15 (BOOTMODE) specifies the device Primary and Backup boot media.

    Q3) When I changed some source code and build a version(.out), in some cases, the program loading(.out) continued and was not completed as below (error case 1). and also sometimes "Finish Typpdef 1549 typedefs" was shown (ease 2).

    could you share your experience on this? should I update the specific firmware version of Blackhawk XDS560v2 (USB&LAN) for CCS11 by any chance?

    [MW] In general, it is good practice to either "System Reset" or "Power Cycle" the board and start a new CCS debug session to avoid any loading issue. Sometime restart the CCS is necessary. 

    Best regards,

    Ming

  • Hi Ming,

    Thank you for your kind explanation. 

    one thing I have to check again with you. could you share which case can generate "Finish indexing xxxx typdefs" (error case 2 in my previous comments).

    when I use "bh560v external debugger" even on the evaluation board (no boot mode), this error happened continuously. so I cannot run even "ospi_flash_io"  to veriy a new flash driver. Probably there are some incorrect things in the test configuration.

    Could you try to run the example on “AM243x-EVM” with bh560v external debugger? if a success, I would like to compare it with our setup.

    Regards

    Moonil

  • Hi Moonil,

    I tried the BH-USB-560M external SB emulator on AM243x EVM. It works fine and load and run various OUT files without any issue. Here is my setting for Debug Configuration:

    The other way to make it works is using the Scripting Console (without Debug Configuration):

     

    Best regards,

    Ming

  • Hi Ming,

    Thanks for your confirmation with the Blackhawk debugger.

    Can I ask you about CCS version you are using?

    I am using CCS 11.1.0.00011. In this version, the issue still happens with the same configuration you shared. but, when I tried to test the same with the latest CCS version, 12.0.0.00009, I found it works well.

    Do you think this has a dependency with CCS version?

    Please understand our team is using 11.1.0.00011 currently and the dev environment for our team should not change unless any special issue.

    So first, I would like to cross-check the same with you for CCS 11.1.0.00011 to clarify its dependency with CCS version.

    I would appreciate it if you can make time to check once again the same with CCS 11.1.0.00011.


    Regards,

    Moonil

  • Hi Moonil,

    I used 11.2.0. I also tried the CCS 11.1.0 and CCS 12.0.0 using the Script Console and 

    js:> loadJSFile "C:\ti\mcu_plus_sdk_am243x_08_03_00_18\tools\ccs_load\am243x\load_dmsc.js"

    They all worked.

    Please notice that the load_dsmc.js is MCU+ SDK version dependent, not CCS version dependent.

    Best regards,

    Ming