nrf5340: Evaluating Power Consumption of XIP Functions

Hello,

I am looking into evaluating the nrf5340 with different functions running out of external flash, and how current draw is affected by these functions. We are looking at running some code out of qspi flash, and other code internally. We plan to measure the power consumption of different types of code running from the different resources, so we can decide what code is OK to run out of external flash. Is there a simple Zephyr sample project that I can start with where I can set some functions to run XIP out of the external QSPI flash, and others to run internally?

Walt

Parents
  • Thanks for this information and the sample project. I download the project and built it. I am having problems flashing it.  I am using the nrf SDK version 1.9.0 and Visual Studio Code with Windows 10.  Here is my flash command and the response:

    nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --verify --program build/zephyr/zephyr.hex --log

    Parsing image file.
    Verifying programming.
    ERROR: [  nRF53] - Data does not match in QSPI memory address range [0x00000000-0x000051f4]
    ERROR: [  nRF53] - QSPI memory verification failed
    ERROR: [  nRF53] - Failed while verifying file build/zephyr/zephyr.hex.
    ERROR: Write verify failed.

    I also tried to make my own little application that places some functions in external flash space. Here is a portion of the map file that shows "test_code" and "test2_code" in external flash space, as well as the flash command and response:

    xip_text        0x10000000       0x34
                    0x10000000                . = ALIGN (0x4)
    xip_text       0x10000000       0x34 app/libapp.a(test_code.c.obj)
                    0x10000000                test_code
                    0x1000001a                test2_code

    But on flashing the device, it shows an error that the program downloader doesn’t know how to write to external QSPI flash.

    nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --verify --program internal_flash/zephyr/zephyr.hex --log

    Parsing image file.
    ERROR: [ Worker] - Address 0x00100000 does not map to a known memory.
    ERROR: The file specified is not a valid hex file, has data outside valid areas
    ERROR: or does not have data in valid areas.

Reply
  • Thanks for this information and the sample project. I download the project and built it. I am having problems flashing it.  I am using the nrf SDK version 1.9.0 and Visual Studio Code with Windows 10.  Here is my flash command and the response:

    nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --verify --program build/zephyr/zephyr.hex --log

    Parsing image file.
    Verifying programming.
    ERROR: [  nRF53] - Data does not match in QSPI memory address range [0x00000000-0x000051f4]
    ERROR: [  nRF53] - QSPI memory verification failed
    ERROR: [  nRF53] - Failed while verifying file build/zephyr/zephyr.hex.
    ERROR: Write verify failed.

    I also tried to make my own little application that places some functions in external flash space. Here is a portion of the map file that shows "test_code" and "test2_code" in external flash space, as well as the flash command and response:

    xip_text        0x10000000       0x34
                    0x10000000                . = ALIGN (0x4)
    xip_text       0x10000000       0x34 app/libapp.a(test_code.c.obj)
                    0x10000000                test_code
                    0x1000001a                test2_code

    But on flashing the device, it shows an error that the program downloader doesn’t know how to write to external QSPI flash.

    nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --verify --program internal_flash/zephyr/zephyr.hex --log

    Parsing image file.
    ERROR: [ Worker] - Address 0x00100000 does not map to a known memory.
    ERROR: The file specified is not a valid hex file, has data outside valid areas
    ERROR: or does not have data in valid areas.

Children
No Data
Related