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.

TMS320C6657: C6657 SPI-Boot from NAND-Flash

Part Number: TMS320C6657

Hi,

we have a custom Board with a C6657-Processor that we want to boot DIRECTLY via SPI from a NAND-Flash. So no IBL, just the RBL.
The Mainquestion is: Is it possible to directly boot the C6657 RBL from a NAND-Flash connected via SPI?
Searching for a couple of days, so far I could only find examples booting from a NOR-Flash via SPI or booting from a NAND-Flash via EMIF.

This is our current Situation:

The Processor will initialize the SPI-Boot and get some Data from the NAND-Flash (Clocking for about 2 ms), but the Program in the Flash won't be executed properly.
We tried flashing the exact same Image to the NOR-Flash on the EVM-Board and the Processor executes it as expected (SPI is clocking for 123 ms). 

Our Bootpins are Configured as follows:

PIN -1:   1 (littleendian)
PIN 00:  0 (SPI)
PIN 01:  1 (SPI)
PIN 02:  1 (SPI)
PIN 03:  0 (Image-Offset)
PIN 04:  0 (Image-Offset)
PIN 05:  0 (Image-Offset)
PIN 06:  0 (Image-Offset)
PIN 07:  0 (CS0)
PIN 08:  1 (CS0)
PIN 09:  0 (16-bit Addresses)
PIN 10:  0 (4Pin SPI)
PIN 11:  0 (SPI-Mode 2)
PIN 12:  1 (SPI-Mode 2)

We are using this Flash: W25N01GVZEIG with 1Gbit Memory. The Flash is configured in continuous-Mode, so a single Read-Instruction will read the entire Image. In the Datasheet this mode is said to accomplish compatibility to their NOR-Flash Instructions.

The Image is created using these instructions http://au.tono.my/log/20140117-c6657-spi-boot.html and flashed to Page 0 from a C2000-Processor.

So the Questions would be 
 Is it possible to directly boot the C6657 RBL from a NAND-Flash connected via SPI?
and 
What exactly does Bootconfig-Pin 9 express? What are the 16/24Bit-Adresses? And where in the Flash-datasheet can I find this Value?
and
maybe how would one debug the RBL-Bootloader? How can I read the 
debug log messages stated in the RBL-sourcecode?

Thank you and regards
Oliver

  • Hi Oliver,

    I am afraid this is NOT possible. See Section 3.8 SPI Bootloader Operation from the DSP Bootloader for Keystone Devices user Guide. The document talks only about spi boot with NOR flash connected to it: 
       "In the SPI boot mode, the RBL initializes only the SPI peripheral. Similar to the I2C boot mode, in the SPI boot mode, the interrupt subsystem and the EDMA are not enabled. The image is read from the NOR flash."

    Best Regards,
    Yordan
      

  • Hi Yordan,

    thank you for the very fast answer. So the best option would be changing to a NOR-Flash.

    In order to understand the boot-process better:
    What exactly does Bootconfig-Pin 9 express? What are the 16/24Bit-Adresses? And where in the Flash-datasheet can I find this Value?
    In the processors Datasheet Section 6.28.2.7 it is only stated as "SPI address width configuration". For that I cannot find any connection to a value stated in a NAND or NOR Flash datasheet.

    and maybe how would one debug the RBL-Bootloader? How can I read the debug log messages stated in the RBL-sourcecode?
    In the spimain.c source file of the RBL there are several lines that call this function:
          bootLogEntry ((char *)fname, __LINE__, BOOT_SPI_LOG_READ_FAIL);
    Is there a possibility to start the processor with the failing boot process, then connect the ccs debugger and read out these logentries?

    Best Regards 
    Oliver

  • The first question concerning the address width I was able to solve.

    I did not read the footnotes in the NOR-datasheet stating that after the READ-command 2(16bit) or 3(24bit) bytes are sent to the Flash containing the address being read.

  • Hi Oliver,

    Regarding your second question:
     

    maybe how would one debug the RBL-Bootloader? How can I read the debug log messages stated in the RBL-sourcecode?

    You can take a look at the following e2e threads:  

        

    Best Regards,
    Yordan