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.

Flash a boot code to SPI flash on AM180x?

Other Parts Discussed in Thread: AM1802, AM1808

I'm using AM1802 with SPI boot mode. I would like to write initial boot code to blank SPI flash by JTAG emulator.
I was able to burn my code with using SPIWriter and XDS100v2, but it's needed to change the BOOT Pin configuration to "emulation debug" mode.

Is there any method to write the code without changing boot pin configuration? The default setting of my system is SPI1 Flash.

Best regards,
Masa

  • Masa,

    If the boot pin hook ups are done okay, you should be able to connect to the device even when the device is set in SPI Flash boot mode. If there is no boot image in the SPI flash the device will fall in to idle state after aborting boot and you can connect over Jtag to write a new image without changing  the boot pins. Give this a try and let us know if you are able to connect using JTAG even when boot pins are set to SP flash boot mode.

    Regards,

    Rahul

  • Thank you very much for your advice. I was able to write the boot code to blank SPI flash with SPI Boot pin configuration.

    Is it possible to update the code to SPI flash, too? I would also like to update the code without changing the boot pin configuration. In my case, the configuration setting is SPI boot.

    Best regards,
    Masa

  • Hi Masa,

    How do you plan to update the code in the SPI flash ? If this is over JTAG then yes, you can update using the same switch settings But if you plan to update over UART or some other boot media, you need to create the provision to change the boot switches.

    Regards,

    Rahul

  • Hi Rahul

     I'm planing to update the boot code through JTAG. If there is no image on SPI flash, it's succeeded to write the code to SPI Flash. I confirmed this operation with using SPI flash writer and XDS100v2.
     However if a valid boot code has already been written in the flash, I was not able to update the code through JTAG with using flash writer.
     If the boot pin configuration is changed to SPI flash mode to JTAG emulation mode, I confirmed that a code can be updated. If there is a solution to update the code to SPI flash via JTAG without changing boot pin configuration, I would like to know it because my prototype board does not have switch on it.

    Best regards,
    Masa

  • Masa,

    Can you elaborate on the following:

    Masa said:
     However if a valid boot code has already been written in the flash, I was not able to update the code through JTAG with using flash writer.

     Is it a write error or a boot error? What error do you see? does the spi writer perform and erase before writing and a read back verification after the write?

    Even if there is a boot image in the SPI flash, you should be able to connect to the device using JTAG and rewrite the image on the flash so I am not sure what the issue is with your setup

    Best Regards,

    Rahul

  • Hi Rahul-San,

     Thank you for your feedback. I tried to update the code to AM1808 EVM through XDS100v2, but I was not able to do it. JTAG connection was not completed from CCS. Please refer to the attached picture.

    This progress was not finished. If the boot pin configuration is changed to JTAG emulation mode, JTAG connection is succeeded and the code can be updated.
     Any idea why JTAG connection was not completed in my case. GEL file might be modified?

    Best regards,
    Masa

  • Okay, I understand your usecase better now. When you write an boot image to the SPI flash and maintain the same switch settings to boot, the AIS boot image in the flash initializes your device(PSC,PLL,PINMUX, DDR) the same way as the GEL file does and loads the application binary in the memory.

    So when you try to reconnect the device using a JTAG, you should remove the GEL file because the onTarget function in the GEL tries to reinitialize the power domains (LPSC), PLLs and PINMUX and DDR settings when it has already been initialized and in use.

    Please let us know if you are still not able to connect to the device after removing the GEL file.

    Regards,

    Rahul

  • Hi Rahul-san,

     Thank you very much for your support. The code in SPI flash can be updated without changing the boot pin configuration. As you advised, it can be performed by removing GEL file.

    Best regards,
    Masa