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.

AM6421: Boot time estimations

Part Number: AM6421
Other Parts Discussed in Thread: SK-AM62

As my team discusses the boot options in our custom design, my software team has expressed concerns over the speed of boot times for each available port - something we may have run into in the distant past. Can TI provide rough order of magnitude estimates for realistic boot times when loading Linux and some example application from TI's example code as a point of reference? I am told the image must be loaded into RAM from NAND to execute?

For example, some hello-world or industrial control example image you may already have. Please kindly specify the one you are referencing.

What are example real-world boot times we might see if we boot NAND from:

  • I2C
  • SPI
  • QSPI
  • OSPI
  • SD
  • eMMC
  • Parallel
  • Nicholas,

    Due to Independence day holiday in the US our expert is out till Wednesday (5th July). We will get back to you on some estimates. For fast booting with Linux with AM6x devices, we have created a E2E article that describes how to fast boot using Falcon boot modes:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1205638/faq-am625-how-to-boot-from-r5-u-boot-spl-directly-into-the-linux-kernel-skipping-a53-spl-and-a53-u-boot-falcon-mode

    With Falcon boot mode, we have seen overall boot time < 2-3 seconds with tinyFS and minimal kernal image on AM62 devices.

    Thanks and Regards,

    Rahul 

  • Thank you, I will have my team review this information - though, it looks like the working examples do not include our boot type, however it will be reviewed further. That said, I will continue to wait patiently for an applicable answer to my original question. We started with a debate and question about different SPI boot times and it spread to whether we want to consider other faster options. Looking forward to rough order of magnitude info - not fractions of seconds of accuracy. Trying to compare each interface and get a real-world expectation for our management's understanding of what we could achieve with an example application. This is not for a specific task to reduce boot time, it is just getting a base point for real boot times if not using falcon boot and a typical image.

  • Hi Nicholas,

    On a giving platform on which DDR is set, the boot time difference among your boot media list would be the binary reading time. which can roughly be calculated by the interface speed and bus width. The binary execution time in DDR would be all the same. However we don't have such numbers for your reference. Thought I would imagine the difference would be within a second range (I2C boot is not supported in Processor SDK).

    In my testing of falcon mode on SK-AM62 in eMMC and OSPI boot modes, it saves about 5 seconds in boot time.

  • Hello Bin Liu, So you are saying that the unpacking and expansion time into RAM is identical to each data transfer method and so transferring the image from NAND will be the determining factor. OK, I can understand this. Though, it is not clear what the breakdown might be for how much time is spent in each of those activities - which contributes more, perhaps we have been using older hardware, but the expansion of the image takes time beyond simply reading the NAND but we don't have a sense for the AM6x which is many times fatser than what we are used to.

    Based on your answer, will it be strictly true that SPI will be one speed, QSPI will be 4x that speed, OSPI will be 8x speed and that will translate directly to boot time. In this sense, would it be also true that booting from NAND on a parallel bus would then be 16x speed because it has more data lines? Using less lines is more convenient to allow more flexible pinouts, but we are trying to get a high level view of the benefits/drawbacks of choosing something like QSP or OSPI vs parallel.

    Is there not any example from TI's code base which can be used as a reference for comparing even one or two of the boot methods anyone can share the boot time of as reference? Like, using the EVM development kit and booting project XYZ booting from micro SD card takes approximately ABC seconds. The same project booting from QSPI on some custom test board takes XYZ as long.

    I am not looking for exact numbers, but a range can help, are we talking like 10-20 seconds, 45-90 seconds, 5 minutes? Please assume base regular booting and not Falcon. Please just help set a baseline estimate range.

  • Hi Nicholas,

    It seems I need explain more on this to give you a better picture. Since I am not really an expert on these flash interfaces, I would need more time to write it up, and ensure my explanation is correct and accurate. Please give me a few more days to get back to you.

  • No problem, just let me know when you are done, it has been a few days now. In all of the people on this forum I believed somebody could share some real world examples for comparison. Is QSPI always 4x faster than SPI? Is SPI 1 second boot, 10 seconds boot, 10,000 second boot? Parallel? Nobody is holding anyone to an exact time quote we just are looking for an order of magnitude scale.

  • Hi Nicholas,

    Yes, QSPI is 4x fast of SPI, and OSPI is 8x fast of SPI. However, the point I am trying to make here is that the flash speed only affects the binary loading speed. Depending on your Linux boot time requirement, the binary loading time difference might not be significant.

    For example, when O/Q/SPI runs at 166MHz DDR mode, the OSPI theory data rate is 333MB/sec. I believe I measure the OSPI reading speed on AM62x is 220MB/sec. The typical (uncompressed) kernel image size would be around 10MB, so loading this kernel image to DDR from OSPI takes 10/220*1000=45msec, 90ms from QSPI, and 360ms from SPI. If you boot time requirement is 10sec, you might be able to optimize in other places to save this 300ms difference from OSPI and SPI, and only consider other factors such as flash size and price to decide using OSPI or SPI.

    If the boot time requirement is 1 or 2 seconds, of cause you would have to use the fastest flash interface.

    Hopefully this makes sense.

  • Hello Bin,

    Thank you for this estimation. So now you are saying the difference between different boot options is significantly less compared to the time it takes to boot Linux once the image is loaded. Thank you this is the important information I was hoping to confirm - I was hoping for the rough breakdown in the real world for this solution's boot time and I think you gave it to me.

    Approximately 220MB/s is likely achievable over OSPI, and even with SPI we are still looking at <1 second depending on image size
    Approximate Linux boot time may be in the range of 10 seconds, also depending on our build.

    This is perfect to have preliminary discussions, thanks.

  • Hi Nicholas,

    Yes 10 seconds Linux boot time should not be difficult to achieve, especially when you use U-Boot falcon mode (which skips tispl.bin and u-boot,img).

    Another factor when considering OSPI/QSPI vs eMMC is that OSPI/OSPI typically has small capacity. So you have to ensure it is big enough to hold the rootfs, or you might consider eMMC.

  • Hello Bin, as I have stated in earlier messages, I would like to understand regular boot times. Previously you indicated Falcon boot can save ~5 seconds or achieve down to 2 seconds boot according to Rahul in the first response, then when I asked about regular boot without Falcon your example was 10 seconds. Now you are saying 10 seconds is with Falcon boot not with regular boot. Please tell me which is it and what is an example realistic boot we can expect without falcon mode?

    As for your concerns about SPI/QSPI/OSPI being small capacity, I appreciate you calling attention to this detail, it should not be an issue with our application code - but I do not have an understanding for the size of Linux - you stated the Kernel is close to 10MB but I don't know how the size will be impacted based on added peripherals and code needed to run our application. What is a realistic project size for a real application? Motor control or Ethernet/EtherCAT communication etc.

  • Now you are saying 10 seconds is with Falcon boot not with regular boot.

    I am not sure how this was concluded.

    Yes 10 seconds Linux boot time should not be difficult to achieve, especially when you use U-Boot falcon mode

    I believe my statement above doesn't mean 10 seconds is with Falcon boot not with regular boot.

    what is an example realistic boot we can expect without falcon mode?

    There is no such example, since the boot time is heavily relying on the uboot, kernel, and linux init configuration.

    What is a realistic project size for a real application?

    Same here, it would be huge difference from one project to another, how the Linux system is designed, how much data/log would be generated and stored on the flash.