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: CCS cannot load program

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

Tool/software:

Hi,

I am working on AM263P4 CC Eva board with CCS v1260 and debugger XDS110.

I found I can only load program by CCS debugger at Dev BootMode.

If set boot mode to QSPI(1s), I got the error message like this:

I used to work on AM2634 CC board and the debugger always work at QSPI boot mode.

So why it doesn't work on AM263P4? and how could I make it work?

Thanks

  • Hi Yin,

    I see that you are trying to load OSPI NAND example, which is not correct, as we do not have NAND flash boot on AM263Px -control card.

  • AM263Px CC has two Flashes.

    If I set to Dev boot mode, this example code runs successful.

    this is from AM263Px CC user manual, page 24

  • Hi Yin,

    We do not have OSPI NAND boot mode in AM263Px, Since you are using OSPI boot mode it will work with NOR Flash only, the ROM configures the OSPI to read application image from NOR flash.

    I would recommend 

    If I set to Dev boot mode, this example code runs successful.

    Yes that is true because in this case you are loading the example directly into RAM via JTAG. But in case of OSPI boot mode ROM is trying to use OSPI peripheral to read SBL image from NOR Flash

  • May I know what is the use case you are trying to achieve if you are trying just OSPI boot mode I would recommend using this software-dl.ti.com/.../GETTING_STARTED_FLASH.html

  • In OSPI NAND example, the Flash config is like this:

    this is the chip mentioned on CC user manual.

    I am confused of "don't have OSPI NAND boot mode", this is from AM263Px TRM,

    In my test, when set to QSPI(1S), I got the error shown in the first post.

    I understand that the RBL configure OSPI to load SBL through QSPI(1S) but failed to do that. From the manual, it shoud fallback to uart boot mode, and it should not stop debugger to load program into RAM.

  • Our hardware design was following AM2634 CC board, it using QSPI connected with S25FLS128 flash chip.

    Now we want replace the AM2634 by AM263Px only, so we need to make AM263Px works with S25FLS128 through QSPI/OSPI(1S) mode.

  • Phoenix,

    Yes, the AM263P4 controlCARD EVM has both OSPI NOR and QSPI NAND flash devices. However, you can only boot from the device connected to OSPI chip select 0, which in this case, is the OSPI NOR flash device. Note that the AM263P4 can only boot from NOR flash devices as the NAND flash protocol is not something that the device ROM supports.

    Therefore, you can use the QSPI NAND flash device as external flash, but cannot boot from the contents of the QSPI NAND flash.

    If you want to boot AM263Px with a QSPI flash, it must be a NOR flash device and it must be connected to OSPI CS0 in your design.

    Regards,

    Brennan  

  • Hi Pheonix.

    In OSPI NAND example, the Flash config is like this:

    this is the chip mentioned on CC user manual.

    I am confused of "don't have OSPI NAND boot mode", this is from AM263Px TRM,

    If you are trying this on your custom board change that to 1s-1s-1s ( I am assuming you have connected S25FLS128  flash to CS0 of AM263Px)

    Try using this flash configuration:(you will need to modify the SBL syscfg flash configuration)

    flash1.$name = "CONFIG_FLASH0";
    flash1.strDtr_cmdRegRd = "0x85";
    flash1.strDtr_cmdRegWr = "0x81";
    flash1.strDtr_mask = "255";
    flash1.xspiWipRdCmd = "0x05";
    flash1.strDtr_shift = 255;
    flash1.fourByteEnableSeq = "0";
    flash1.device = "CUSTOM_FLASH";
    flash1.fname = "S25FL128SA";
    flash1.flashSize = 16777216;
    flash1.flashManfId = "0x01";
    flash1.flashDeviceId = "0x2018";
    flash1.flashBlockSize = 65536;
    flash1.cmdBlockErase4B = "0xD8";
    flash1.cmdSectorErase4B = "0x20";
    flash1.resetType = "0x10";
    flash1.flashDeviceBusyTimeout = 24000000;
    flash1.flashPageProgTimeout = 4000;
    flash1.flashQeType = "1";
    flash1.cmdExtType = "NONE";
    flash1.dummy_cfgReg = "0x00";
    flash1.proto_cfgReg = "0x00";
    flash1.strDtr_isAddrReg = true;
    flash1.deviceBusyType = "1";
    flash1.enable4BAddr = false;
    flash1.protocol = "1s_1s_1s";
    flash1.peripheralDriver.$name = "CONFIG_OSPI0";

  • Hi Brennan,

    Thanks for your explaination.

    But it doesn't explained why when setting at OSPI(1S) boot mode, RBL cannot load SBL from external flash?

    what's the limitation of OSPI(1S) boot mode?

    At OSPI(1S) boot mode, I cannot run sbl_jtag_uniflash_am263px project which can be run successful at Dev boot mode, any explaination for this?

  • Hi Nilabh,

    I tried to load SDK sbl_jtag_uniflash example under Dev boot mode and it works fine.

    But when load it under OSPI(4S) boot mode, it doesn't work. I found it always jump to address 0xc (no code area) rather than _c_int00.

    Any idea? Any explain of how the RBL works in these two boot mode?

    Please note that it is nothing related with OSPI driver yet, it doesn't jump to the start of the program.

    thanks

  • i Pheonix,

    In DEV boot mode, you are actually using JTAG lines to load any code in TCM or RAM and execute it from there, ROM is not doing much just few basic initializations, rest is upto GELs files which do the clock, peripheral setup. So as long as you can write code to RAM/TCM using JTAG it will work.

    Where as in OSPIboot mode, ROM reads the SOP pins sees that it is expected to get SBL from flash(0x0 offset fixed), it setup OSPI peripheral then copied the SBL to RAM and executes the code then upon SBL running, SBL fetches teh application from flash again(based on what you code in SBL)

    Read more about these in TRM section 5

  • But when load it under OSPI(4S) boot mode, it doesn't work. I found it always jump to address 0xc (no code area) rather than _c_int00.

    Any idea? Any explain of how the RBL works in these two boot mode?

    Please note that it is nothing related with OSPI driver yet, it doesn't jump to the start of the program.

    This is not a correct sequence, FOr correct sequence of OSPI boot follow this: software-dl.ti.com/.../GETTING_STARTED_FLASH.html

  • Hi Nilabh,

    I have done that step for SOC initialization (load sbl_null into ext flash), it is successful but it doesn't help to run sbl_jtag_uniflash project under OSPI(4S) boot mode.

    I have done it several times. 

    In OSPI(8S) boot mode, I can run this project from CCS without any problem even I erase the ext flash. Which means the sbl_null is not necessary.

    In OSPI(4S) boot mode, the same project doesn't run.

    If you have CC board, could you please try on your board? or can we setup a debug session where I can show you what I am doing?

  • Hi,

    From our hardware design view, we cannot set boot mode to Dev mode and we cannot add those switches on the board.

    So the boot mode was fixed as OSPI(4S) boot mode.

    The question is that I cannot run sbl_jtag_uniflash to flash anything into ext flash.

    From my view, no matter in Dev mode or 4S mode, when connected target by debugger, the gel always init the mcu to allow CCS load program into SRAM to run.

  • Hi Phoenix,

    The question is that I cannot run sbl_jtag_uniflash to flash anything into ext flash.

    From my view, no matter in Dev mode or 4S mode, when connected target by debugger, the gel always init the mcu to allow CCS load program into SRAM to run.

    Please do the following to run the SBL JTAG Uniflash:

    sbl_jtag_flashing.pdf

    Let me know if this helps.

  • Hello Phoenix,

    Can you share your configurations for 4s mode?

    Thanks,
    Gunjan

  • Has been shared over email.

  • From another TI engineer, he said the current mcal only works on 1S, 8S and 8D mode with EVA board. This is the known limitation.