TI E2E Community
Digital Signal Processors (DSP)
C6000 Multicore DSP
Keystone Multicore Forum (C66, 66A, AM5)
PCIe Boot of C6678 and platform_init
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?
The plaform init reconfigures the PLL while PCIe still using it. That is the reason that devices freezes.
If you need more help, please reply back. If this answers the question,
please click Verify Answer , below.
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?
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?
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.
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:
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.
Please click the Verify Answer button on this post if it answers your question.
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.