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.

Problem with SPI-A booting with C28346

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.

  • It seems that more people have faced the same problem with spi-a bootloading with BIOS, as it can be seen in this link.

    From that link, and from what I have also seen, it seems that the hwi vector table is not correctly written inside the memory. At first point, the bootloader correctly copies the contents from the flash to the SRAM. Yet, due to the fact that the specific memory area is EALLOW protected, the PIE vector is not correctly written. In this way, the SRAM gets corrupted, the BIOS cannot start and the program ends into an erroneous endless state.

    It would be really helpful if I could get a response from a TI employee whether these assumptions regarding the bootloader and the BIOS usage are correct or not.

    Also, I would like to ask whether there is another way to achieve a correct bootloading procedure, e.g. with a 2nd level bootloader, and where I could find an application example for C28346.

    Thank you.

    Best Regards.

     

  • We’re closing out this old thread. If you feel there is more discussion on the topic, please feel free to "Reply".