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.

66AK2H14: Instructions for ARM Boot

Part Number: 66AK2H14
Other Parts Discussed in Thread: 66AK2H12

Hello, I designed a custom PCB with the 66AK2H14 processor and have configured it to DSP Boot or ARM Boot by a three pin jumper. I am able to write to the NAND memory if I load my test program from the JTAG so things are looking good so far. I just need some instruction on how to generate the proper files to do a ARM Boot. If there are any instructions on how to do a DSP Boot those would be appreciate also. 

Is there any registers that I can read to verify my jumper settings for ARM Boot are correct?

Thank you,

Joe

  • Joe,

    The instructions to boot from NAND on this devices are documented here:

    http://www.ti.com/lit/an/spracn3/spracn3.pdf

    We have the image formatting tools and single stage booting described in that document. The key gotcha in NAND boot is typically the format in which NAND ECC is programmed in the spare area. Please make sure that the ECC data is written in the correct format as done using the CCS based NAND writer we provide in SDK.

    The ECC data needs to be generated using EMIF and stored in the same format as described here: (nandwriter supports two ECC layouts)

    http://processors.wiki.ti.com/index.php/DM365_Nand_ECC_layout 

    It may good for you to confirm this setup on K2H EVM to confirm the image format before you move to the custom platform. Please let us know if you run into any issues and we can provide further guidance.

    Regards,

    Rahul

  • Hello, thank you for responding to my message. My co-worker took the program and tried using an EVM and he was successful. I will print out your reference docs and get with him.

    Joe

  • Just wanted to give the part# 66AK2H14DAAWA24 of the device we are using. Thanks, Joe

  • Joe,

    Yes, the instructions published applies to the part number that you are using since this uses the same ROM bootloader baseline as the part on the EVM (66AK2H12). 

    Regards,

    Rahul

  • Hello,

    I am working with joe and i have come across some issues with booting from NAND using a custom board. I have tested my code on the DEV board and it successfully wrote my image to shared memory. I couldn't use your tools because the NAND we are using is different, although it is ONFI compatible and the geometry is the same.

    I have successfully written the ECC values into the spare area and double checked the results against our custom platform and the EVM. the only difference between the two is the NAND chip we are using, and the PLL settings for the ARM and the System Clock at boot time. What else is required for the RBL (rom boot loader) to startup successfully. Is there any way to monitor this start up sequence? 

    Again, my code/ GP Header Image works for the EVM Board but does not for the custom setup. I can read back the image from Nand along with the ECC Values and the format is exactly the same it just wont boot. 

  • Just as a side note:

    Are there any registers/ memory addesses we can monitor to see if the RBL even starts up?

  • Alfredo,

    If you can connect to the A15 and look at the Program counter and report back the value, I can correlate that with the ROM symbols and indicate where the ROM is hung in the boot process.Any location other than 0x0000000 will indicate the ROM has started. Other options is to use the ARM boot loader RAM memory map. Table 10-2 and look at the Boot Trace and Boot log and Boot data buffer to see if the ROM is progressing. Also, check boot parameter table location and make sure correct NAND geomtry is detected.

    We don`t share the ROM binary and the symbol table for the ROM but there are some simple checkpoints that you can look for to confirm that the A15 goes through when booting from NAND. to help with the debug here are some locations that you can monitor/set HW breakpoints:

    .nandEccData Location 0x0c592000 size : 00000200

    .nandData  Location 0x0c590000 00002000 

    Symbols to set HW breakpoints:

    • 0x0000e648 _bootMainNand
    • 0x000057b4 _NAND_open
    • 0x000059b4 _NAND_readPage
    • 0x00005b68 _NAND_readSpareBytesOfPage

    Again, bootlog and Trace buffers will also give more insights.

    Regards,

    Rahul

  • Rahul,

    I don't see any of these symbols in the disassembly at startup, also I don't have my sections set up either as that is the next step. right now all I'm trying to do is load code onto shared memory onto out custom board, which the EVM does already. I am doing everything in bare metal in my own version as well, so i more than likely won't have all the information you are expecting back from your IP.

    One of my main concerns is  how impactful the startup clocks are to the RBL.

    does the RBL expect to be driven at the speed provided by the EVM?

    Devstat register for our custom board is 0x02010867  

    and the Devstat for the EVM is               0x02030CE7

    Is this a possible issue? 

  • Rahul,

    any updates on my last question?

  • UPDATE,

    Joe and I scoped out the signals to see if the bootloader started at all, I don't think it did as the signals we captured only show the EMIF being powered on.

    Here are the screen shots of the signals we scoped out. I noticed that the CLE signal stays low and i never see the processor attempt any transactions to

    read the NAND.

    Are there specific moments in time where the bootloader activates?

  • Rahul,

    I forgot to include an other incident that kept reoccurring in my last reply. The WE pin sporadically toggled at around 1.6s into loading, is  this expected behavior of the RBL?

  • Alfredo,

    Sorry for the delay. I was a little tied up with other tasks so couldn`t get back on this topic.

    Setup clocks are and power sequencing is critical for the ROM boot. Please ensure that your custom design follows the Power up sequence in section 11.2.1 in the data manual. Table 10-27 in the data manual describes the clock/PLL default programming in the device. The input clock setting from the boot mode switches and the device speed grade variant is used to setup the default clocks. As long as you have used one of the eight supported values of the clocks and setup the BOOTMODE[7:5] and BOOTMODE[11:9] as per your board design the clocks will be setup correctly by the ROM.

    EVM DEVSTAT = 0x02030CE7

    First Block = 000
    Clear NAND = 0
    ARM PLL = 110 (312.5)
    Boot master = 0 (ARM)
    SYS PLL = 111 (122.88)
    Boot mode = 0011
    Little Endian =1

    Custom board DEVSTAT =0x02010867

    First Block = 000
    Clear NAND = 0
    ARM PLL = 100 (156.25)
    Boot master = 0 (ARM)
    SYS PLL = 011 (100)
    Boot mode = 0011
    Little Endian = 1

    Please ensure that the values of ARM and SYSPLL match your board design.

    Regards,

    Rahul

  • Can you please monitor SYSCLKOUT pin and report the value that you observe on that pin. For 1GHz SYSCLK setting,  the value observed on the pin by default should be SYSCLK/6 = 166.66 Mhz. This will indicate if the SYSCLK was setup or not in the ROM. 

    Also, monitor the RESETSTAT pin on the SOC. The RESETSTAT signal indicates the internal reset state. The RESETSTAT pin is driven low by almost all reset initiators and this pin remains low until the device completes initialization.

    I am checking with our HW expert for more board level checks to ensure device is booting but typically we refer chapter 5 in the following document for device configuration and initialization:

    http://www.ti.com/lit/an/sprabv0/sprabv0.pdf 

    From Boot ROM perspective, are you able to connect to the ARM Core 0 and provide a Program counter value. You can get a system dump of the SOC state using the diagnostic tools that we provide here. In CCS, you can load up the GEL and get a system state using the GEL files provided here:

    http://processors.wiki.ti.com/index.php/Keystone_II_Debug_Tools

    Regards,

    Rahul

  • Hello, the SYSCLOCKOUT is 200Mhz (1/6* 1.2Ghz) and the RESETSTAT pin does go high.

    I also noticed that the BOOTCOMPLETE never goes high, is that expected in this case?

    Joe

  • Joe,

    Yes, BOOTCOMPLETE will not go high in this case. you can check the BOOTCOMPLETE description in the E2E discussion here:

    https://e2e.ti.com/support/processors/f/791/t/490604?Keystone-II-EMIF-NOR-Flash-Boot-vs-BOOTCOMPLETE-Assertion

    The fact that RESETSTAT goes high and SYSCLOCKOUT is being set correctly makes me believe the ROM is getting started.

    Regards,

    Rahul

  • Rahul,

    Hello, thank you for responding to my message. What can we do next? I am not the engineer doing the DSP/ARM programming, I'm only a the guy that did the schematics design. What can we try next to solve this problem? 

    Thanks,

    Joe

  • Joe,

    I have looped folks on our HW team to provide guidance from power sequencing and board bring up. From the ROM perspective, I still need you to connect to ARM Core 0 to be able provide insight from ROM boot loader perspective. 

    Regards,

    Rahul

  • Rahul,

    Hello, here is a screen capture of the moment the RESETSTAT pin goes high:

    I put o-scope probes on the NAND Boot memory. I don't see any transactions on the CE or CLE. I don't know what is going on with the WE for two events. 

    If we connected to the target over JTAG and write to this NAND memory is working okay and we see good signal transactions. 

    We must be missing something.

    I also measured the SOC clocks:

    SOC_ARM_CLK is 156.25Mhz

    SOC_SYS_CLK is 100Mhz

    SOC_PASS_CLK is 156.25Mhz

    If you have any ideas, please send them.

    Respectfully,

    Joe

  • Rahul,

    Hello, quick question for you when you say, "I still need you to connect to ARM Core 0 to be able provide insight from ROM boot loader perspective." what exactly do you want me to do? I must admit that I am a newbie at this stuff, usually I stop at the hardware schematics and let the software guru's take over. 

    Thank you for all your help.

    Respectfully,

    Joe

  • Rahul,

    Hi, I now understand what you meant about "connect to ARM Core 0 to be able provide insight from ROM boot loader perspective". I believe Alfredo is working on that. 

    Joe

  • Joe,

    Thanks for the memory dumps. I have not had a chance to look at this issue yet. To find out where the ARM cores is hung. Can you create a target configuration for 66AK2H1x and connect to ARM core 0 on your custom platform using steps provided here:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_how_to_guides.html#connect-to-evmk2h-using-ccs

    Skip the step to populate the GEL file in the "Advanced Tab" as you want to analyze the ROM behavior. The GEL overrides the clock and PSC setup in ROM so we don`t want to use the GEL when analyzing the ROM behavior. After connecting to the ARM Core 0 at the end of the processor. Please go to View-Registers and under core registers look/report the Program counter value. You can also do a Run-> Reset->CPU reset to to put the core back into ROM and let the ROM bootloader restart. The other thing that you can do is from View->Disassembly, will open a Tab similar to memory view and then right click on the address and set HArdware break points at ROM symbol locations to trace if the ROM is getting to a specific stage where it is trying to read from the NAND.

    Regards,

    Rahul 

  • Rahul,

    The PC is at address zero, This should be intentional. The image that I intended to write only contained a bit of data. This was used as an intermediary step to see if the data was being loaded from NAND into shared memory. The EVM loads this data in and populates the data staring at address 0x0c0c0c0c. as expected in the file below. While this may be true for the EVM our custom design does nothing.

    Here is the test data that I have been using

    7608.SImple_Load_NEW.dat

  • The PC being stuck at 0x0 means that the ROM boot loader is not executing or the core may be getting reset. Address 0x00  is the entry point of the ROM. I am a little confused with the finding as you indicated earlier that the SYSCLKOUT was 200 MHz. If the ROM is not starting then the PLL won`t be setup and that value of clock would be 100 Mhz (Input clock)/ 6 or 16.66 MHz.

    Regards,

    Rahul

  • Rahul,

    Hello, if the core is getting reset how could we look into that? Monitor the TI_RESET, TI_RESETFULL and RESETSTAT? I noticed yesterday that the BUSY pin on the NAND was always low, if that is correct, then the DSP could not start a write transaction. That is strange because Alfredo says he is able to write to the memory while in the JTAG mode. Is 200Mhz expected? Is my math correct? If it is correct, then is it safe to say the PLL is setup? 

    The pins on the NAND memory are very tiny making it hard to probe. I will try again today to look at the BUSY pin. 

    Thank you very much and will get back with you ASAP.

    Respectfully,

    Joe

  • Hello, I found that the EMIFWAIT0 was being pulled low somewhere else on the board. This is the first revision of the board and we found an error in the design. The EMIFWAIT0 was connected to an output of a buffer. Quickly found that error, lifted the pin so the EMIFWAIT0 trace was not being pulled low. We were then able to get a Ready on the NAND Flash and then program it, restart the board and then verify the data in memory. All looks good!

    Thank you everyone for all your help and comments.

    Respectfully,

    Joe

  • Joe,

    Thanks for the update and sharing the fix. I do remember running into a similar issue about 5-6 years back with EMIFWAIT pin on one of our internal verification boards on another Keystone II device. Glad to know that you were able to figure that out and have the NAND flash portion of the design verified. 

    Regards,

    Rahul