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.

AM263P4: Flash and Debug Problem for Uni Flash Project

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

Tool/software:

Hello

In our project, we are using the AM263P4 MCU. We use the XDS110 as the programmer and debugger. From the RAM, Flash demo project runs without any issues, but UniFlash custom trial project does not work in Dev-BOOT mode, and we encounter an error. Our Octo SPI connection is the same as on the LaunchPad.

Could you provide assistance with this issue?

Best Regards,

Egemen

  • Hello Brennan,

    At the same time, we tried flashing the code via UART according to the steps that you send, but it freezes as shown in the image.

    Best regards,

    Egemen

  • You are using a custom PCB, right? If so, did you make a custom 'am263px_flasher.out' to match your custom PCB?

    The 'am263px_flasher.out' made by TI will only work on the HW made by TI because it expects to read the EVM board version (E1 or E2) from EEPROM. If it cannot read from EEPROM, it will timeout giving you the error you see. See this thread: AM263P4-Q1: UNIFLASH : Cannot Flash by XDS11S in QSPI(1S) Boot Mode - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    In short you should:

    1) Rebuild this project to ignore the EEPROM_read() above: SDK\tools\flasher\jtag_uniflash\am263px-cc\r5fss0-0_nortos

    2) After you have made your custom flasher, select it in UNIFLASH:

    3) Remember to set OSPI boot mode on your micro. DevBoot won't boot from OSPI.

  • Thanks, Kier!

    Egemen, please try Kier's suggestion. Let me know if issues persist.

    Regards,

    Brennan

  • Hello,

    In the example you provided, I see EEPROM reading for CC, but I couldn't find it for LP. We are using the pre-build version for LP. We tried it for LP, but the issue persists.

    Best regards,

    Egemen

  • Egeman,

    I am looping in our Uniflash expert, please expect a reply tomorrow.

    Regards,

    Brennan

  • OK, the cause is not EEPROM reading in this case. Perhaps the return from Board driversOpen() is not success?

    TI's flasher.out will only work if you have identical OSPI HW. I can see, for example, that you have a different OSPI IC to the LaunchPad. That could be one of many reasons why it doesn't work.

    The point remains that if you have custom HW, you more than likely need to build and debug your own custom flasher.

  • Hi Egemen,

    Could you please confim the following for me:

    1. The flash part being used is same as Lp-Am263P4?

    2. Are you able to run the ospi diagnostics(link below.) example in dev boot mode?

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM263PX/09_01_00_20/exports/docs/api_guide_am263px/EXAMPLES_DRIVERS_OSPI_FLASH_DIAG.html

    3. As for uniflash tool , are you using the default flasher .out if yes, please rebuilt it for your flash configuration or board.

    this will help me in understanding the root cause here?

  • Hello Nilabh,

    1. Our custom board has IS25LX064-LHLE (64Mbit), while the LP has IS25LX256-LHLE (256Mbit).

    2. Diagnostics is attached.

    [Cortex_R5_0] [OSPI Flash Diagnostic Test] Starting ...
    [OSPI Flash Diagnostic Test] Flash Manufacturer ID : 0x9D
    [OSPI Flash Diagnostic Test] Flash Device ID       : 0x5A17
    [OSPI Flash Diagnostic Test] Executing Flash Erase on first block...
    [OSPI Flash Diagnostic Test] Done !!!
    [OSPI Flash Diagnostic Test] Performing Write-Read Test...
    [OSPI Flash Diagnostic Test] Write-Read Test Passed!
    [QSPI Flash Diagnostic Test] SFDP Information : 
    ================================================
                          SFDP                      
    ================================================
    SFDP Major Revision                       : 0x1
    SFDP Minor Revision                       : 0x9
    Number of Parameter Headers in this Table : 3
    
    Types of Additional Parameter Tables in this flash
    ---------------------------------------------------
    4 BYTE ADDRESSING MODE INSTRUCTIONS TABLE
    NOR SPI PROFILE TABLE 
    JSON Data for the flash :
    
    {
    
    	"flashSize": 8388608,
    	"flashPageSize": 256,
    	"flashManfId": "0x9D",
    	"flashDeviceId": "0x5A17",
    	"flashBlockSize": 131072,
    	"flashSectorSize": 4096,
    	"cmdBlockErase3B": "0xD8",
    	"cmdBlockErase4B": "0xDC",
    	"cmdSectorErase3B": "0x20",
    	"cmdSectorErase4B": "0x21",
    	"protos": {
    		"p111": {
    			"isDtr": false,
    			"cmdRd": "0x03",
    			"cmdWr": "0x02",
    			"modeClksCmd": 0,
    			"modeClksRd": 0,
    			"dummyClksCmd": 0,
    			"dummyClksRd": 0,
    			"enableType": "0",
    			"enableSeq": "0x00",
    			"dummyCfg": null,
    			"protoCfg": null,
    			"strDtrCfg": null
    		},
    		"p112": null,
    		"p114": null,
    		"p118": {
    			"isDtr": false,
    			"cmdRd": "0x7C",
    			"cmdWr": "0x84",
    			"modeClksCmd": 0,
    			"modeClksRd": 1,
    			"dummyClksCmd": 0,
    			"dummyClksRd": 7,
    			"enableType": "0",
    			"enableSeq": "0x00",
    			"dummyCfg": null,
    			"protoCfg": null,
    			"strDtrCfg": null
    		},
    		"p444s": null,
    		"p444d": null,
    		"p888s": null,
    		"p888d": {
    			"isDtr": false,
    			"cmdRd": "0x0B",
    			"cmdWr": "0x12",
    			"modeClksCmd": 0,
    			"modeClksRd": 0,
    			"dummyClksCmd": 8,
    			"dummyClksRd": 32,
    			"enableType": "0",
    			"enableSeq": "0x00",
    			"dummyCfg": {
    				"isAddrReg": false,
    				"cmdRegRd":"0x00",
    				"cmdRegWr":"0x00",
    				"cfgReg":"0x00000000",
    				"shift":0,
    				"mask":"0x00",
    				"bitP":31
    			},
    			"protoCfg": {
    				"isAddrReg": false,
    				"cmdRegRd": "0x00",
    				"cmdRegWr": "0x00",
    				"cfgReg": "0x00000000",
    				"shift": 0,
    				"mask": "0x00",
    				"bitP": 0
    			},
    			"strDtrCfg": {
    				"isAddrReg": false,
    				"cmdRegRd": "0x00",
    				"cmdRegWr": "0x00",
    				"cfgReg": "0x00000000",
    				"shift": 0,
    				"mask": "0x00",
    				"bitP": 0
    			}
    		},
    		"pCustom": { 
    			"fxn": null
    		}
    	},
    	"addrByteSupport": "1",
    	"fourByteAddrEnSeq": "0x22",
    	"cmdExtType": "REPEAT",
    	"resetType": "0x30",
    	"deviceBusyType": "0",
    	"cmdWren": "0x06",
    	"cmdRdsr": "0x05",
    	"srWip":  0,
    	"srWel":  0,
    	"cmdChipErase": "0xC7",
    	"rdIdSettings": {
    		"cmd": "0x9F",
    		"numBytes": 5,
    		"dummy4": 0,
    		"dummy8": 0
    	},
    	"xspiWipRdCmd": "0x00",
    	"xspiWipReg": "0x00000000",
    	"xspiWipBit": 0,
    	"flashDeviceBusyTimeout": 20000000,
    	"flashPageProgTimeout": 120
    }
    
    

    3. We are using the default configuration. Since the only difference in the flash memory is the size (64Mbit on the custom board, 256Mbit on the LP), what changes do we need to make in the code?

    Best regards,
    Egemen

  • Thanks Egemen,

    This helps 1 and 2 looks good, as expected.

    For 3 you need to change the flash configuration in syscfg:

    https://software-dl.ti.com/mcu-plus-sdk/esd/AM263PX/10_01_00_31/exports/docs/api_guide_am263px/CUSTOM_FLASH_SUPPORT_GUIDE.html

    Even if the change in flash size, please make change that in flasher syscfg. you can find the example project for flasher here:

    C:\ti\mcu_plus_sdk_am263px_10_00_01\tools\flasher\jtag_uniflash\

  • Hello Nilabh,

    Thank you for your support.

    We modified the SPI_OSPI code according to the custom board and adjusted the flash writer in SysConfig, then compiled and flashed it.

    In the first figure, when only the bootloader was flashed, it loaded without any issues.


    In the second figure, an issue occurred when flashing both the bootloader and the application.


    In the third figure, it loaded successfully without any problems.

    Is this behavior normal?

    Best regards,
    Egemen

  • Glad that it worked for you.

     did you start a new Uniflash session when you tried flashing for second time(this is required)? Sometimes JTAG connection can also cause these failures, but I believe these error should not be redundant.