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.

PCIe Boot of C6678 and platform_init

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am trying to boot a snippet of test code over PCIe on a C6678 EVM.

I have CCS5.1.1.00031 and MCSDK 02_00_05_17 as well as PDK C6678_1_0_0_17. (The IBL has been flashed with the bin provided in the MCSDK. The Boot DIP switches are in the ROM PCIe Boot position, the Board enumerates over PCIe)

I can get the board to boot into main when booting from PCIe but when I call platform_init to initialise the board it never returns. If i remove platform the program executres correctly (but I cannot use the UART or other peripherals).

If i do not boot over pcie but load the same code directly from CCS it works as expected.

Are there some initialisation steps I am missing when booting over PCIe?

The linker command file is set to load the entire program into L2SRAM.

What can I do to fix this?

Regards,

Phil Dawson

  • Phil,

    The plaform init reconfigures the PLL while PCIe still using it. That is the reason that devices freezes.

    Thanks,

    Arun.

  • Arun,

    It seems to crash even if i set the init_flags to 0 to avoid touching the PLL. I cannot properly follow the code if I attempt to debug within the platform library (is it optimised by default?) but it appears to be initialising the PLL even if the flag is false.

    Is there another way i should be initialising the device if platform_init won't work?

    Thanks,

    Phil

  • Hi Phil,

    Yes it seems like even with that flag cleared there is a DDR PLL that is initialized. not sure why. Is there any specific reason you want the platfor init there?

    thanks,

    arun.

  • Hi Arun,

    I had the platform init there as without it I couldn't get the platform uart init to work when booting the code through CCS debugging. I believe I saw it used in some of the example code.

    Our goal is to be able to boot from PCIe and have use of UART, SRIO and DDR, so I need to be able to initialize everything that they require.

    I have to admit I'm a little unsure on what needs to be initialized when we're booting from different states (CCS or PCIe) and what is already taken care of, if there is an initialization guide you could point me to it would be very helpful.

    Thanks,

    Phil

  • Hi Phil, I'm not aware of any initialization guide apart from SPRUGY5 (Bootloader User Guide). But the bootloader source code is available, and might be of help:

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/rbl/1_0_C6678/index_FDS.html

    Regards, Jon

  • Phil,

    The only thing you're need to initialize via the PCIe (as opposed to with the code you load via PCIe) are peripherals that you're going to use prior to boot completion.  Usually this is limited to memory interfaces such as the DDR memory if you're planning on storing code to it during the boot process.  Otherwise, peripherals such as the UART are often configured after boot completion, during initialization period (usually the first thing done after entering main() or possibly handled by SYSBIOS after boot is completed.)

    As for CCS, you don't need to boot anything normally (on PG 1.0 of C667x devices it should use I2C boot to work around a PLL config bug that's normally configured in the BootROM.)  If you're planning on loading code to external memories, you can initialize them via a GEL file such as is provided w/ the EVMs.

    Best Regards,

    Chad

  • Hi All,

    Having recreated the project from scratch has fixed the problem, I beleive there was a conflict in having an RTSC project and the linker.cmd file. Removing the file and putting the linker map into the RTSC.cfg file has fixed it and allows platform_init and the uart functions to work after booting from PCIe.

    Thanks for all your help.

    Phil