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.
请问是否按照下面文档里的步骤操作的?
https://software-dl.ti.com/mcu-plus-sdk/esd/AM243X/08_04_00_17/exports/docs/api_guide_am243x/TOOLS_FLASH.html#TOOLS_FLASH_UART_UNIFLASH
再按照Flash tool error messages and solutions看一下是不是flash driver的问题。
https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_02_00_28/exports/docs/api_guide_am263x/TOOLS_FLASH.html
我把芯片焊在Demo板上,就可以烧录程序,在自己板上,烧录就会报错,校验无法通过,请问是啥原因?我通过JLink调试程序,Flash就写不进去,焊在Demo板上就可以。这个现象,感觉脱离CCS+XDS110环境,就无法烧录Flash,请问是啥原因?
[INFO] Selected config file based flashing, parsing config file ...
[INFO] Parsing config file ... SUCCESS. Found 5 command(s) !!!
[INFO] Executing command 1 of 5 ...
[INFO] Found flash writer ... sending sbl_prebuilt/am243x-lp/GD25Q16E/sbl_uart_uniflash_GD25Q16E.tiimage
[INFO] Sent flashwriter sbl_prebuilt/am243x-lp/GD25Q16E/sbl_uart_uniflash_GD25Q16E.tiimage of size 288543 bytes in 29.82s.
[INFO] Executing command 2 of 5 ...
[INFO] Command arguments : --operation=flash-phy-tuning-data
Sent flash phy tuning data in 3.47s.
[STATUS] SUCCESS !!!
[INFO] Executing command 3 of 5 ...
[INFO] Command arguments : --file=sbl_prebuilt/am243x-lp/GD25Q16E/sbl_ospi_GD25Q16E.tiimage --operation=flash --flash-offset=0x0
Sent sbl_prebuilt/am243x-lp/GD25Q16E/sbl_ospi_GD25Q16E.tiimage of size 294558 bytes in 30.49s.
[STATUS] ERROR: Flash verify failed !!!
[INFO] Executing command 4 of 5 ...
[INFO] Command arguments : --file=sbl_prebuilt/am243x-lp/GD25Q16E/gpio_multi_led_blink.appimage --operation=flash --flash-offset=0x80000
Sent sbl_prebuilt/am243x-lp/GD25Q16E/gpio_multi_led_blink.appimage of size 27132 bytes in 5.47s.
[STATUS] ERROR: Flash verify failed !!!
[INFO] Executing command 5 of 5 ...
[INFO] Command arguments : --file=sbl_prebuilt/am243x-lp/GD25Q16E/gpio_multi_led_blink.appimage_xip --operation=flash-xip
Sent sbl_prebuilt/am243x-lp/GD25Q16E/gpio_multi_led_blink.appimage_xip of size 52 bytes in 2.97s.
[STATUS] SUCCESS !!!
All commands from config file are executed !!!
自己的板子,用OSPI模块的Flash数据间接写功能OSPI_DEV_INSTR_WR_CONFIG_REG,无法写Flash,用Flash通用cmd命令模式OSPI_FLASH_CMD_CTRL_REG,1S1S1S方式写QSPI Flash,是可以的。感觉是MCU的一个BUG,或是XDS仿真器设置了OSPI模块,请专家帮忙看看这是什么原因,谢谢。以下是我用OSPI通用命令写Flash的代码,这是成功的。
void Flash_WriteTest()
{
Flash_Handle config = Flash_getHandle(0);
int32_t status = SystemP_SUCCESS;
OSPI_CmdParams wrParams =
{
.cmdMask = CMD_MASK_CMMD | CMD_MASK_ADDR,
.cmdCode = 0x02,
.cmdAddr = 0x00080000,
.cmdMode = 0x00,
.dummyCycle = 0x00,
.dataBuf = (uint8_t*)ioLedfw,
.dataLen = 8,
};
uint32_t wrLen;
uint32_t dtLen = ioLedfwLen;
while(dtLen>0)
{
wrLen = (dtLen > 8U) ? 8U : dtLen;
wrParams.dataLen = wrLen;
/* Write Enable command */
status = Flash_nor4SpiSetWEL(config, TRUE);
if(status != SystemP_SUCCESS)
break;
status = Flash_nor4SpiWaitReady(config, TIMEOUT_PROG_PAGE);
if(status != SystemP_SUCCESS)
break;
status = OSPI_cmdWrite(config->ospiHandle, &wrParams);
if(status != SystemP_SUCCESS)
break;
status = Flash_nor4SpiWaitReady(config, TIMEOUT_PROG_PAGE);
if(status != SystemP_SUCCESS)
break;
dtLen -= wrLen;
wrParams.cmdAddr += wrLen;
wrParams.dataBuf += wrLen;
}
/* Write Enable command */
status += Flash_nor4SpiSetWEL(config, FALSE);
}
看到之前e2e工程师有回复,我们对第三方的IDE的支持有限。
Note that TI has verified compatibility with the Code Composer Studio IDE only and cannot provide custom support for 3rd party IDE's.
https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1162117/am2434-source-code-for-gel_reset-fuction