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: Programmming microcontroller produces error.

Part Number: AM2434
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Hello,

I have been tasked with loading program to RAM and flash of AM2434_ALX.

Hardware setup used:

PC --> XDS110 DEBUG PROBE --> Debug and AUX to JTAG convertor --> JTAG on AM2434_ALX

Target configuration used:

Connection: TI XDS110 DEBUG PROBE
Board or device: AM2434_ALX

JTAG frequency: 100kHz

When trying “Test connection” in ccs target configuration everything works fine. I can connect to the MAIN_Cortex_R5_0_0. However trying to load any file produces error:

 

MAIN_Cortex_R5_0_0: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x40: (Error -1065 @ 0x40) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.6.0.00172)

MAIN_Cortex_R5_0_0: File Loader: Verification failed: Target failed to write 0x00000000

I have tried various TCLK speeds, and nothing seems to work. The same error is also produced when using UNIFLASH tool and programing the flash memory of the chip.

When trying to run this setup on AM243X LP everything seems to work fine.

What would be the steps to get rid of this error?

  • Hi Dominik,

    In order to use the JTAG version of the flash writer (C:\ti\mcu_plus_sdk_am243x_08_02_00_31\examples\drivers\boot\sbl_jtag_uniflash), you will need to initialize the AM243x LP. There are two ways to do this:

    1. Using the sbl_null AM243x MCU+ SDK: EVM Setup (ti.com) (the recommended way) or

    2. Using the launch_dmsc.js (not the recommended way)

    Best regards,

    Ming

  • Hello Ming,

    thank you for your reply. However I am NOT looking to use JTAG on the AM243x LP but on
    actual AM2434 MCU that has JTAG interface present. Is the procedure the same?

  • Hi Dominik,

    Are you looking for using the sbl_jtag_uniflash on your own AM243x board? If yes, the procedure is the same, since most of the steps are for the AM243x SoC. The only difference will be in sbl_jtag_uniflash, because it is designed for the OSPI flash on AM243x LP.

    Best regards,

    Ming

  • Hey Ming, 

    again really appreciate your help. At the moment I am looking to Load a project from CCS onto Am2434 board. 
    But only JTAG interface is available on the board. Is this possible? If yes, could you provide me steps to do this.

    Thank you for your help

    Dominik

  • Hi Dominik,

    You can use the CCS gel file to initialize the AM243x SoC. Please refer to the following link for details: AM243x MCU+ SDK: EVM Setup (ti.com). Looking for the load_dmsc.js in the CCS script window.

    Best regards,

    Ming

  • Dominik,

    As Ming mentioned above, you can't just connect the core and load the binary on AM243x/AM64x class of devices. You need to load the system firmware, pass the board config to sysfw before doing anything useful.

    In our SDK, this is been taken care by SBL NULL or load_dmsc.js scripts.

    You will need to enable similar flow in your board.

    Regards,

    Prasad

  • Hello Ming, 

    thank you for your advice I have managed to use the "load_dmsc.js" to initialize the SoC The issue was hidden in incorrect target configuration.(Missing gel file on Cortex M3). I am now able to use UniFlash and load image which is a good progress for me. But the image doesn´t seem to survive power cycle. To my understanding this is expected behaviour and I need to run the sbl_null. But running this produces this error:

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    C:\ti\mcu_plus_sdk_am243x_08_02_00_31\tools\boot>python uart_uniflash.py -p COM10 --cfg=sbl_prebuilt/am243x-lp/default_sbl_null.cfg

    Parsing config file ...
    Parsing config file ... SUCCESS. Found 2 command(s) !!!

    Executing command 1 of 2 ...
    Found flash writer ... sending sbl_prebuilt/am243x-lp/sbl_uart_uniflash.release.tiimage
    Sending sbl_prebuilt/am243x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 0/315405 [00:00<?, ?bytes/s]send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    send error: expected NAK, CRC, EOT or CAN; got b'\x00'
    Sending sbl_prebuilt/am243x-lp/sbl_uart_uniflash.release.tiimage: 0%| | 2/315405 [00:00<?, ?bytes/s]
    [ERROR] XMODEM send failed, no response OR incorrect response from EVM OR cancelled by user,
    Power cycle EVM and run this script again !!!

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Do you have any tips on how to get rid of this?

    Thank you for your help and have a nice day.

    Dominik

  • Hello Prasad,

    thank you for joining this thread. I have made the description of my progress and described the issue in more detail in my reply to Ming.

  • Hi Dominic,

    Here is the steps you should go through to flash your program onto the flash on your board:

    0. Set your board to "NO BOOT"

    1. Use "load_dmsc.js" to initialize your board

    2. Load the  modified sbl_jtag_uniflash with CCS and JTAG to your board

    3. Run the  sbl_jtag_uniflash.

    4. Load the sbl_ospi in to the memory as instructed by the  sbl_jtag_uniflash prompt (with script console)

    5. Continue the sbl_jtag_uniflash to flash the sbl_ospi into flash address 0x0

    6. Reset your board

    7. Use "load_dmsc.js" to initialize your board

    8. Load the  modified sbl_jtag_uniflash with CCS and JTAG to your board

    9. Run the  sbl_jtag_uniflash.

    10. Load your application code (AppImage) in to the memory as instructed by the  sbl_jtag_uniflash prompt (with script console)

    11. Continue the sbl_jtag_uniflash to flash your application code (AppImage) into flash address 0x80000

    12 Set your board to "OSPI BOOT"

    13 Reset your board

    As you can see, you do ot need to run "python uart_uniflash.py" at all, because you do not have UART interface on your baord.

    Best regards,

    Ming 

  • Hey Ming,

    very helpful guide! Only step unclear for me is the modification of the sbl_jtag_unliflash. Does only the sysconfig file need to be modified to match my board?

  • Hi Dominik,

    The sbl_jtag_uniflash came with the MCU+ SDK 08.02.00.31 is for the on-board flash on AM243x EVM and LP. I am not sure what kind of flash you are using on your board. The modifications may be needed, if you are using different kind of flash than the AM243x EVM and LP. You do not need to change the sysconfig if you using the same pins for the OSPI interface.

    Best regards,

    Ming

  • Hey Ming,

    Flash used is IS25LP080D, but I cannot find it in the sysconfig FLASH configuration. I can see only S28HS512T, MX25LM25645G, S25HL512T. Should I choose from the ones available or somehow add my flash type? I am also using the same pinning as LP.

    Best regards,

    Dominik

  • Hi Dominik,

    Since you are using the same pins as the AM243x LP, so no need to change the SysConfig.

    For details about the supporting customer flash, please refer to the following URL: AM243x MCU+ SDK: Writing flash driver for a custom flash device

    Best regards,

    Ming 

  • Hey ming,

    thank you for your help in this thread.