nRF5340 Audio DK with the audio application nrf5340_audio - Testing Problem

PROBLEM:

I am trying to test the nRF5340 Audio DK with the audio application nrf5340_audio. This application is included with the version of the SDK under the applications folder. I have successfully built and programed two  boards following the directions on the Audio Example Page.

  • Now I'm trying to test the boards using the example in the Testing Section HERE.
  • The RGB2 and LED3 are not blinking as described. 
  • Can anyone help me to determine why?
  • Is the version of the SDK supported using the python script?
  • Did I build or program correctly?
  • I'm stuck. HAs anyone verified this SDK version with the Audio example ?
  • Do I need to use an earlier version of the SDK?

Development platform used:

  • Windows10
  • nRFConnect SDK version v2.4.0
  • Audio example from the directory C:\ncs\v2.4.0\nrf\applications\nrf5340_audio
  • Audio Example page nRF5340 Audio
  • Toolchain Manger v1.2.5

What I have done to this point:

  1. o To Build I use the command:
    1.  python buildprog.py -c both -b debug -d both -m external
    2. Results: the report showing a successful build
    3. Note: I'm using "-m external" because '-m internal" did not work because the debug firmware was too big, I mentioned this above.
  2. To Progra, I Use the command:
    1. python buildprog.py -c both -b debug -d both -p --recover_on_fail
    2. Results: the report showing that both the App and the net have been programmed to the boards.

    3. Still get the use recover arg error in the output, even though I ran the command with “--recover_on_fail” ?
      Received some other errors refer to “s4_program_sucess_with_recover.txt”
    4. NOTE: The App doc page is incorrect the program command has an incorrect argument “--recover-on-fail”! It should be defined with underscores not dashes.
      THIS NEEDS TO BE FIXED ON THE DOC PAGE TO STOP CONFUSION WHEN USING THE AUDIO EXAMPLE TO BUILD & PROGRAM the KIT

Here's a snapshot of the section on the Page where I'm referring to in my problem statement from above. Testing Section

  • Hi,

    Thank you very much for sharing your observations with us.

    • Now I'm trying to test the boards using the example in the Testing Section HERE.
    • The RGB2 and LED3 are not blinking as described. 
    • Can anyone help me to determine why?
    • Is the version of the SDK supported using the python script?
    • Did I build or program correctly?
    • I'm stuck. HAs anyone verified this SDK version with the Audio example ?
    • Do I need to use an earlier version of the SDK?

    Could you please specify how RGB2 and LED3 blink in your case compared to what is described in the documentation?

    Even if you see different colors than expected, there might still be no problem with how the sample is built or programmed. Looking at your provided outputs, I would assume that you programmed the devices correctly and they should work as expected.  In addition, there does not seem to be the case that there is something wrong with the SDK. You can always try previous version in case you want to verify programming procedure, compare the outputs or check the colors of RGB2 and LED3.

    Still get the use recover arg error in the output, even though I ran the command with “--recover_on_fail” ?
    Received some other errors refer to “s4_program_sucess_with_recover.txt”

    Could you show the errors in the output that you refer to?

    NOTE: The App doc page is incorrect the program command has an incorrect argument “--recover-on-fail”! It should be defined with underscores not dashes.
    THIS NEEDS TO BE FIXED ON THE DOC PAGE TO STOP CONFUSION WHEN USING THE AUDIO EXAMPLE TO BUILD & PROGRAM the KIT

    Yes, you are right. As you mentioned, a correct parameter would be --recover_on_fail. I have reported this internally and hope for a quick fix.

    Best regards,
    Dejan

  • Hello  

    Thank you so much for responding so quickly. I will answer you questions about my problem.

    Could you please specify how RGB2 and LED3 blink in your case compared to what is described in the documentation?

    the 2 devices are plugged into the same USB connections on my PC running Windows 10. When I turn on the devices the LED's on both the gateway and the headset do not illuminate at all. There is no way for me to continue the test since it appears that "blinking green on every device to indicate the ongoing CPU activity"

    Even if you see different colors than expected, there might still be no problem with how the sample is built or programmed. Looking at your provided outputs, I would assume that you programmed the devices correctly and they should work as expected.  In addition, there does not seem to be the case that there is something wrong with the SDK. You can always try previous version in case you want to verify programming procedure, compare the outputs or check the colors of RGB2 and LED3.

    The only reason to question the SDK is that I copied the audio example from the applications directory under the 2.4.0 release "C:\ncs\v2.4.0\nrf\applications\nrf5340_audio" to a new shorter named directory. I then ran the python script from there.I'd rather focus on this version of the SDK, to find out why the LEDS specified are not illuminated. 

    I would normally debug the application, but I use VSCode to debug C code and VSCode is not supported. So I seek advice from DevZone.


    Still get the use recover arg error in the output, even though I ran the command with “--recover_on_fail” ?
    Received some other errors refer to “s4_program_sucess_with_recover.txt”

    Could you show the errors in the output that you refer to?

    Here it is:

    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
    $ python buildprog.py -c both -b debug -d both -p --recover_on_fail
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    | 1050131916 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
    |     10     |  ←[33mFalse←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    Invoking build step
    Net core uses precompiled hex
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_headset\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [4/6] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_gateway\build_debug
    [0/14] Performing build step for 'empty_net_core_subimage'
    [0/5] Performing build step for 'b0n_subimage'
    ninja: no work to do.
    [1/10] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
    [2/10] Generating ../../zephyr/net_core_app_test_update.hex
    image.py: sign the payload
    [6/6] Running post-build ble5-ctr signing step...
    0x00000001
    image.py: sign the payload
    input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
    relative path
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050171701 headset left
    Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming net core on: 1050131916 gateway
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050171701 headset left
    ERROR: The operation attempted is unavailable due to readback protection in
    ERROR: your device. Please use --recover to unlock the device.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    Recovering device: 1050131916 gateway
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Recovering device. This operation might take 30s.
    [error] [ Client] - Encountered error -90: Command enable_coprocessor executed for 14 milliseconds with result -90
    Recovering device. This operation might take 30s.
    [error] [ Worker] - Application core access protection is enabled, can't enable coprocessor.
    Erasing user code and UICR flash areas.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Writing image to disable ap protect.
    Recovering device. This operation might take 30s.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Programming net core on: 1050131916 gateway
    Programming net core on: 1050171701 headset left
    Programming app core on: 1050131916 gateway
    Programming app core on: 1050171701 headset left
    Programming UICR
    Parsing parameters.
    Writing.
    Parsing parameters.
    Writing.
    Resetting 1050131916 gateway
    Parsing parameters.
    Writing.
    Resetting 1050171701 headset left
    Applying system reset.
    Run.
    Applying system reset.
    Run.
    build_prog.py finished. Report:
    +------------+----------+---------+--------------+---------------------+---------------------+
    |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
    +------------+----------+---------+--------------+---------------------+---------------------+
    | 1050171701 |   True   | headset | Not selected |         Done        |         Done        |
    | 1050131916 |   True   | gateway | Not selected |         Done        |         Done        |
    |     10     |  False   | headset | Not selected |     Not selected    |     Not selected    |
    +------------+----------+---------+--------------+---------------------+---------------------+
    
    skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog

    NOTE: The App doc page is incorrect the program command has an incorrect argument “--recover-on-fail”! It should be defined with underscores not dashes.
    THIS NEEDS TO BE FIXED ON THE DOC PAGE TO STOP CONFUSION WHEN USING THE AUDIO EXAMPLE TO BUILD & PROGRAM the KIT
    Yes, you are right. As you mentioned, a correct parameter would be --recover_on_fail. I have reported this internally and hope for a quick fix.

    Thanks for reporting this. Is there a way for uses to be aware of Nordic documentation updates? Other vendors, like Renesas support send email notifications to document updates that the user is interested in.. I realize and the doc page notes specifies right up front, that this is experimental and that "There is an ongoing process of restructuring the nRF5340 Audio application project.",.

    It would be nice to know for makers like myself who are experimenting with the example and trying to get the application running before making experimental changes.

    If anyone is interested you can follow my review blog on Element14 here Roadtest: Nordic Bluetooth LE Audio Development Kit nRF5340 DK. In this review myself and two other members have reviewed the Kit. I'm using this doc to try to get the 2 boards working with the Audio example. 

    Other Observations

    SOME KNOWN issues with different SDK versions and the Audio Application.

    i noticed in the TESTING section of the doc, there is a NOTE to check known issues related to serial connections. at nRF5340 Audio application known issues 

    As noted there are Detection issues with USB-C to USB-C connections, but my PC does not have USB-C connectors. So, I was wondering if it also affect my USB PC USB connection also? Also the versions affected include SDK version 2.4.0. How can I dig deeper into the release notes if possible? All issues listed in the known issues page under the nRF5340 Audio Section report a issue with 2.4.0? 

    Also, here are the 6 com ports assigned when the devices are connected to the PC

    Shown here in my windows device manager. 

    Let me know your thoughts on this

    Regards

    Steve K

  • Hi,

    Could you please show an error which you get when using "python buildprog.py -c both -b debug -d both -m internal" command for building the application?

    Best regards,
    Dejan

  • Hi,

    I used the -M in the command  "python buildprog.py -c both -b debug -d both -m internal -M" 

    I tried the build and program again and received no Error but the same results "NO LEDs are illuminated. I'll post the out at the end of this comment after I reply to your question.

    Could you please show an error which you get when using "python buildprog.py -c both -b debug -d both -m internal" command for building the application?

    I don't have a complete output but here are the notes I took. I hope you can see the error message on the screenshot.

    -----------------------------------------------------------------

    Now you're ready to run the script.

    1. Copy the sample example from the SDK version directory to C:\A\s1. I used v2.4.0, so here is the directory where the code is: C:\ncs\v2.4.0\nrf\applications\nrf5340_audio
    2. After this is copied, EDIT the Jason config file nrf5340_audio_dk_devices.json  as described 
    3. To build the script go to the directory    cd C:/A/s1/tools/buildprog
      1. python buildprog.py -c both -b debug -d both -m internal –M
      1. TURN on BOTH BOARDS
      2. Enter in the following command:
    4. it starts to build with the following output.

      But I ran into a fatal error with building zephyr FLASH OVERFLOW

      -------------------------------------------------------------------------------------------

       

      I tried the build and program again and received no Error but the same results "NO LEDs are illuminated.  here is the results

      BUilD and PROGRAM the Audio example
      $  python buildprog.py -c both -b debug -d both -m internal -M
      $ python buildprog.py -c both -b debug -d both -p --recover_on_fail
      
      this was taken from my command screen:
      ---BEGIN
      -------------------------------------------------------------------------------------------------------------------------------------------------
      skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
      $  python buildprog.py -c both -b debug -d both -m internal -M
      +------------+----------+---------+--------------+---------------------+---------------------+
      |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
      +------------+----------+---------+--------------+---------------------+---------------------+
      | 1050171701 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      | 1050131916 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
      |     10     |  ←[33mFalse←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      +------------+----------+---------+--------------+---------------------+---------------------+
      Invoking build step
      Net core uses precompiled hex
      Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_headset\build_debug 
      [0/14] Performing build step for 'empty_net_core_subimage'
      [0/5] Performing build step for 'b0n_subimage'
      ninja: no work to do.
      [1/10] Performing build step for 'mcuboot_subimage'
      ninja: no work to do.
      [4/6] Generating ../../zephyr/net_core_app_test_update.hex
      image.py: sign the payload
      [6/6] Running post-build ble5-ctr signing step...
      0x00000001
      image.py: sign the payload
      input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
      relative path
      Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_gateway\build_debug
      [0/14] Performing build step for 'empty_net_core_subimage'
      [0/5] Performing build step for 'b0n_subimage'
      ninja: no work to do.
      [1/10] Performing build step for 'mcuboot_subimage'
      ninja: no work to do.
      [2/10] Generating ../../zephyr/net_core_app_test_update.hex
      image.py: sign the payload
      [6/6] Running post-build ble5-ctr signing step...
      0x00000001
      image.py: sign the payload
      input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
      relative path
      build_prog.py finished. Report:
      +------------+----------+---------+--------------+---------------------+---------------------+
      |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
      +------------+----------+---------+--------------+---------------------+---------------------+
      | 1050171701 |   True   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      | 1050131916 |   True   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
      |     10     |  False   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      +------------+----------+---------+--------------+---------------------+---------------------+
      
      skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
      $ python buildprog.py -c both -b debug -d both -p --recover_on_fail
      +------------+----------+---------+--------------+---------------------+---------------------+
      |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
      +------------+----------+---------+--------------+---------------------+---------------------+
      | 1050171701 |   ←[32mTrue←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      | 1050131916 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Selected TBD    |
      |     10     |  ←[33mFalse←[0m   | headset | Not selected |     Selected TBD    |     Selected TBD    |
      +------------+----------+---------+--------------+---------------------+---------------------+
      Invoking build step
      Net core uses precompiled hex
      Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_headset\build_debug 
      [0/14] Performing build step for 'empty_net_core_subimage'
      [0/5] Performing build step for 'b0n_subimage'
      ninja: no work to do.
      [1/10] Performing build step for 'mcuboot_subimage'
      ninja: no work to do.
      [4/6] Generating ../../zephyr/net_core_app_test_update.hex
      image.py: sign the payload
      [6/6] Running post-build ble5-ctr signing step...
      0x00000001
      image.py: sign the payload
      input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
      relative path
      Run: west build C:\A\s4 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\A\s4\build\dev_gateway\build_debug
      [0/14] Performing build step for 'empty_net_core_subimage'
      [0/5] Performing build step for 'b0n_subimage'
      ninja: no work to do.
      [1/10] Performing build step for 'mcuboot_subimage'
      ninja: no work to do.
      [4/6] Generating ../../zephyr/net_core_app_test_update.hex
      image.py: sign the payload
      [6/6] Running post-build ble5-ctr signing step...
      0x00000001
      image.py: sign the payload
      input hex name C:\ncs\v2.4.0\nrf\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_shifted_3349.hex
      relative path
      Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050171701 headset left
      Using NET hex: C:\lib\bin\bt_ll_acs_nrf53\bin\ble5-ctr-rpmsg_3349.hex for 1050131916 gateway
      Programming net core on: 1050171701 headset left
      Programming net core on: 1050131916 gateway
      Programming app core on: 1050171701 headset left
      Programming app core on: 1050131916 gateway
      Programming UICR
      Parsing parameters.
      Writing.
      Parsing parameters.
      Writing.
      Resetting 1050131916 gateway
      Parsing parameters.
      Writing.
      Resetting 1050171701 headset left
      Applying system reset.
      Run.
      Applying system reset.
      Run.
      build_prog.py finished. Report:
      +------------+----------+---------+--------------+---------------------+---------------------+
      |    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
      +------------+----------+---------+--------------+---------------------+---------------------+
      | 1050171701 |   True   | headset | Not selected |         Done        |         Done        |
      | 1050131916 |   True   | gateway | Not selected |         Done        |         Done        |
      |     10     |  False   | headset | Not selected |     Not selected    |     Not selected    |
      +------------+----------+---------+--------------+---------------------+---------------------+
      
      skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s4/tools/buildprog
      $
      
      ----END--------------------------------------------------------------------------------------------------------------------------------

    1. hi again,

      I tried it again with a fresh directory and this time the build failed with the overflow error I mentioned.

      This is the output results from the long build. It shows where the overflow happens. it looks like the  problems with the flash using -internal -M

      skrug@DESKTOP-KJBLMH9 MINGW64 /c/A/s5/tools/buildprog
      $ python buildprog.py -c both -b debug -d both -m internal -M

      Memory region Used Size Region Size %age Used
      FLASH: 19284 B 246 KB 7.66%
      RAM: 4080 B 64 KB 6.23%
      SRAM1: 0 GB 64 KB 0.00%
      IDT_LIST: 0 GB 2 KB 0.00%
      [175/178] Creating signature of application
      [176/178] Creating validation for zephyr.hex, storing to
      [178/178] Generating zephyr/merged_CPUNET.hex
      [483/510] Linking C executable zephyr\zephyr_pre0.elf
      FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
      cmd.exe /C "cd . && C:\ncs\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && cmd.exe /C "cd /D C:\A\s5\build\dev_gateway\build_debug\zephyr && C:\ncs\toolchains\31f4403e35\opt\bin\cmake.exe -E echo ""
      c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
      c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 18384 bytes
      collect2.exe: error: ld returned 1 exit status
      ninja: build stopped: subcommand failed.
      FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'C:\A\s5\build\dev_gateway\build_debug'
      Traceback (most recent call last):
      File "buildprog.py", line 404, in <module>
      __main()
      File "buildprog.py", line 387, in __main
      __build_module(build_cfg, options)
      File "buildprog.py", line 150, in __build_module
      raise Exception("cmake error: " + str(ret_val))
      Exception: cmake error: 1

    Related