I am facing a problem with SPI booting.
I am using a custom board with C28346 and I am using SPI-A to boot. I am using BIOS v.5.42, CCS v.5.5, compiler v.6.2.
At first I create a very simple project without any BIOS. The project at the end of its main has an infinite loop that prints out a message and toggles a LED. I burn this project into flash and hard reset the system. Everything works perfect. The LED toggles and when I load the symbols and start the project, the LED starts flashing again and in the console I see the message. In this way I am pretty sure that both the hex2000 and the flash burning sequence have worked as expected. I have also tested the same sequence with a project that has an end and everything works.
The problem begins when I insert the BIOS into the system. At first I run the project with JTAG connection. Everything works perfect, with both the project that just ends and with the one with the infinite loop. I insert a periodic function that flashes a LED into the BIOS every 5 sec, and still everything works perfect.
At the next step I use the hex2000 and the flash burning sequences that I have previously used in order to create the hex file and burn it to the flash. When I hard reset the system, I see the LED flashing in a much faster pace, at around 1 sec. Also, when I load the symbols of the project and debug, I cannot see any logs and the Periodic function at the RTOS Object View in SWI section is characterized as “undefined”. And, the instruction pointer is in an address that is somewhere inside the boot loader functions area (area between 3F F34C to 3F F9EE). In another case, when the periodic does not have a LED flashing function, the LED does not flash.
In all projects, at the start of the main function I have inserted the InitSysCtrl() function, that also disables the watchdog, the InitPeripheralsClocks() function and the SysCtrlRegs.WDKEY = 0x0055 and SysCtrlRegs.WDKEY = 0x00AA inside EALLOW and EDIS in order to reset watchdog counter, and PRG_unlock() function to make sure the flash is unlocked. Also, I have deleted the .gel file from the initialization script of the .ccxml target configuration file.
I must say that in every case, before burning the project to the flash, the JTAG executed program works fine.
So, it seems that the insertion of the BIOS into the project somehow destroys the logic connection that was previously there.
Any suggestions from anyone that has faced a similar problem?
Thank you.