LED Color Anomalies and Suspected Gateway Encoder Initialization Issue with nrf5340

Hello,

I’d like to detail an ongoing issue with LED color states on our hardware setup, along with a potential gateway encoder initialization problem. Ordinarily, the expected behavior is for the gateway center RGB to show green, the left headset to be blue, and the right headset to be purple. After writing to the board, the gateway and one of the headsets switch their LEDs to red after initially showing the correct colors for a short time.

When I reset the headset that switches to red, both headsets return to their proper blue and purple colors, but the gateway continues to show red. Moreover, when I press the reset on the gateway, it momentarily displays the correct green color before reverting to red again. This action also causes one of the headsets to change its LED to red.

Could this be an issue with the encoder initialization on the gateway? If so, what steps can be taken to diagnose and resolve this initialization error?

I appreciate any assistance or insight you can provide on this matter.

Best regards,

Runqi

Parents
  • Hi, 

    Are you using nRF53 Audio DK or a custom board?

    Which version of NCS are you using?

    Could this be an issue with the encoder initialization on the gateway? If so, what steps can be taken to diagnose and resolve this initialization error?

    Solid red (debug mode) means a Fault in the application core has occurred. See the UART log for details and use the RESET button to reset the device. In the release mode, the device resets automatically with no indication on LED or UART.

    Are you using the nRF5340 Audio application? If so, did you modify it? Please kindly elaborate on the modification.

    Could you provide the log from the gateway?

    Moreover, when I press the reset on the gateway, it momentarily displays the correct green color before reverting to red again. This action also causes one of the headsets to change its LED to red.

    Could you also provide the log file from the headset regarding this part?

    Regards,
    Amanda Hsieh 

  • Hi Amanda,

    Apologies for the delayed response; I've been diligently troubleshooting some issues in my code throughout this week. Thank you for your patience and for the assistance provided. Regarding your questions, I have the following updates:

    1. I am using the nRF53 Audio DK with NCS version v2.5.1.
    2. Regarding the issue of the LED lighting up red, I identified and fixed an error last week. However, the gateway board continuously lights up red now, but it seems not to affect the headsets' functionality.
    3. Yes, I have been using the nRF5340 audio application and have made some modifications to it.

    I have used the nRF Connect Serial Terminal app to track information from the gateway board, and here is what I found:

    *** Booting nRF Connect SDK v2.5.1 ***
    GW [00:00:00.008,789] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.5.1                            
             Cmake run : Fri Mar 22 15:00:50 2024
    GW [00:00:00.008,819] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.008,819] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.019,439] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.066,619] <inf> bt_mgmt_ctlr_cfg: Controller: LL_ACS_NRF53. Version: 3424
    GW [00:00:00.068,511] <inf> bt_mgmt: Local identity addr: F9:7D:1C:43:49:F7 (random)
    GW [00:00:00.190,917] <inf> bt_mgmt_scan: Local addr: 78:28:AB:58:D8:C8 (random). May time out. Updates not printed
    GW [00:00:00.190,917] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.792,510] <inf> bt_mgmt_scan: Creating connection to device: 79:1F:DA:21:37:28 (random)
    GW [00:00:00.894,104] <inf> bt_mgmt: Connected: 79:1F:DA:21:37:28 (random)
    GW [00:00:00.907,043] <inf> bt_mgmt_scan: Local addr: 4F:C9:D0:A1:20:5B (random). May time out. Updates not printed
    GW [00:00:00.907,043] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.907,287] <inf> streamctrl_unicast_client: Device connected
    GW [00:00:01.201,049] <inf> bt_mgmt_scan: Creating connection to device: 65:98:54:7D:A7:AE (random)
    GW [00:00:01.297,180] <inf> bt_mgmt: Connected: 65:98:54:7D:A7:AE (random)
    GW [00:00:01.297,424] <inf> streamctrl_unicast_client: Device connected
    GW [00:00:01.403,381] <inf> streamctrl_unicast_client: Security changed
    GW [00:00:01.823,425] <inf> streamctrl_unicast_client: Security changed
    GW [00:00:01.923,248] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:02.183,258] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:03.164,184] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:03.243,743] <inf> unicast_client: Enable stream 0x20006bb8
    GW [00:00:03.424,224] <inf> unicast_client: RIGHT sink stream configured
    GW [00:00:03.503,723] <inf> unicast_client: Enable stream 0x20006e28
    GW [00:00:03.683,227] <inf> unicast_client: Stream 0x20006bb8 started
    GW [00:00:03.683,502] <err> os: ***** USAGE FAULT *****
    GW [00:00:03.683,532] <err> os:   Stack overflow (context area not valid)
    GW [00:00:03.683,532] <err> os: r0/a1:  0x20021648  r1/a2:  0x2001430c  r2/a3:  0x00000001
    GW [00:00:03.683,532] <err> os: r3/a4:  0x00000064 r12/ip:  0x00000064 r14/lr:  0x00049d39
    GW [00:00:03.683,563] <err> os:  xpsr:  0x81000000
    GW [00:00:03.683,563] <err> os: s[ 0]:  0x00000002  s[ 1]:  0x00000002  s[ 2]:  0x00003e80  s[ 3]:  0x00000064
    GW [00:00:03.683,593] <err> os: s[ 4]:  0x20014288  s[ 5]:  0x00049d39  s[ 6]:  0x00000000  s[ 7]:  0x00000001
    GW [00:00:03.683,593] <err> os: s[ 8]:  0x20014288  s[ 9]:  0x00000fb8  s[10]:  0x200059d4  s[11]:  0x00000fb0
    GW [00:00:03.683,593] <err> os: s[12]:  0x00000fb0  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x20014280
    GW [00:00:03.683,593] <err> os: fpscr:  0x00000000
    GW [00:00:03.683,624] <err> os: Faulting instruction address (r15/pc): 0x00049a18
    GW [00:00:03.683,624] <err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
    GW [00:00:03.683,654] <err> os: Current thread: 0x20006998 (LE_AUDIO_MSG_SUB)
    GW [00:00:03.683,654] <err> error_handler: Caught system error -- reason 2. Entering infinite loop

    Additionally, I was wondering if you could guide me on how to view the printf messages from the code running on the board in the terminal. Understanding how to correctly see these messages would greatly help me in debugging and further refining the application.

    Thank you once again for your help and support.

    Runqi

  • Hi Amanda,

    Thank you for the suggestion. I will definitely try switching to NCS v2.6.0 to see if it offers more stability for my project.

    Regarding the version switch, I've checked my system with nrfutil toolchain-manager search and found that I currently have versions 2.5.1 and 2.5.2 installed. Once I install v2.6.0, could you guide me on how to switch to this new version for my project? I want to ensure I’m utilizing v2.6.0 correctly without affecting the existing setup.

    Additionally, I have another question related to the debugging of my application. How can I determine and print the SDU size and the payload size for LC3 within my code? Understanding these values in real-time could greatly help me in troubleshooting and optimizing the data handling process.

    Thank you again for your support and guidance. I’m looking forward to your advice on these matters.

    Best regards,

    Runqi

  • Hi, 

    runqi said:
    could you guide me on how to switch to this new version for my project?

    See the v2.6.0 migration guide for nRF5340 Audio applications. Duplicate the v2.6.0 Audio application, and modify it as you did on v2.5.1.  

    runqi said:
    How can I determine and print the SDU size and the payload size for LC3 within my code? Understanding these values in real-time could greatly help me in troubleshooting and optimizing the data handling process.

    v2.6.0 might solve this issue. 

    -Amanda H.

  • Hi Amanda,

    I apologize for the delayed response; it took me a week to get back to you. I have successfully installed version v2.6.0 on my computer and migrated my previous code over to this new version. I wanted to update you that the issue regarding the SDU size I had mentioned previously has now been resolved. However, a new issue has emerged on the gateway side. The log indicates a problem with "audio_datapath: I2S RX overrun. Single msg." Here are the specific details:

    GW [00:00:00.320,434] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Fri Apr 05 13:40:14 2024
    GW [00:00:00.320,434] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.320,434] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.338,806] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    GW [00:00:00.339,019] <inf> bt_mgmt: Local identity addr: F1:53:CB:A1:37:61 (random)
    GW [00:00:00.348,358] <inf> bt_mgmt_scan: Local addr: 4E:C5:37:35:3A:EC (random). May time out. Updates not printed
    GW [00:00:00.348,358] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:01.161,682] <inf> bt_mgmt_scan: Creating connection to device: 63:F6:80:B8:9E:C3 (random)
    GW [00:00:01.271,820] <inf> bt_mgmt: Connected: 63:F6:80:B8:9E:C3 (random)
    GW [00:00:01.272,796] <inf> bt_mgmt_scan: Local addr: 4E:C5:37:35:3A:EC (random). May time out. Updates not printed
    GW [00:00:01.272,796] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:01.272,827] <inf> main: Device connected
    GW [00:00:01.621,093] <inf> bt_mgmt_scan: Creating connection to device: 42:96:F1:2E:7D:9A (random)
    GW [00:00:01.729,644] <inf> bt_mgmt: Connected: 42:96:F1:2E:7D:9A (random)
    GW [00:00:01.729,675] <inf> main: Device connected
    GW [00:00:02.034,301] <inf> main: Security changed
    GW [00:00:02.424,316] <inf> main: Security changed
    GW [00:00:02.634,399] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:03.064,392] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:04.555,236] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:04.634,765] <inf> unicast_client: Enable stream 0x20004988
    GW [00:00:04.954,193] <inf> unicast_client: Stream 0x20004988 started
    GW [00:00:04.986,389] <wrn> audio_datapath: I2S RX overrun. Single msg
    GW [00:00:04.993,408] <wrn> audio_datapath: I2S RX continuing stream
    GW [00:00:04.993,438] <inf> audio_datapath: Drft comp state: CALIB
    GW [00:00:05.003,387] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 4 messages dropped ---
    GW [00:00:05.065,216] <inf> unicast_client: RIGHT sink stream configured
    --- 8 messages dropped ---
    GW [00:00:05.116,394] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 8 messages dropped ---
    GW [00:00:05.182,403] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 9 messages dropped ---
    GW [00:00:05.264,343] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:05.318,298] <wrn> audio_datapath: I2S RX continuing stream
    --- 5 messages dropped ---
    GW [00:00:05.367,279] <wrn> audio_datapath: I2S RX continuing stream
    --- 5 messages dropped ---
    GW [00:00:05.428,253] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:05.480,255] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 6 messages dropped ---
    GW [00:00:05.538,238] <wrn> audio_datapath: I2S RX continuing stream
    --- 5 messages dropped ---
    GW [00:00:05.591,247] <wrn> audio_datapath: I2S RX continuing stream
    --- 6 messages dropped ---
    GW [00:00:05.654,235] <wrn> audio_datapath: I2S RX overrun. Single msg

    Additionally, here is the log from the headsets side:

    *** Booting nRF Connect SDK v3.5.99-ncs1 ***
    HL [00:00:00.267,028] <inf> board_version: Compatible board/HW version found: 1.0.0
    HL [00:00:00.319,458] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Fri Apr 05 13:38:30 2024
    HL [00:00:00.319,458] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.319,458] <inf> fw_info: HEADSET left device
    HL [00:00:00.339,172] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.339,385] <inf> bt_mgmt: Local identity addr: E4:0A:37:69:AE:56 (random)
    HL [00:00:00.352,233] <inf> bt_mgmt_adv: Local addr: 5F:3D:BD:33:96:D2 (random)
    HL [00:00:00.352,325] <inf> bt_mgmt_adv: Adv directed to: F1:53:CB:A1:37:61 (random).
    HL [00:00:00.352,935] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.871,307] <inf> bt_mgmt: Connected: F1:53:CB:A1:37:61 (random)
    HL [00:00:00.871,337] <inf> main: Connected
    HL [00:00:00.871,704] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HL [00:00:00.871,795] <inf> bt_mgmt_adv: Local addr: 5F:3D:BD:33:96:D2 (random)
    HL [00:00:01.439,270] <inf> main: Security changed
    HL [00:00:01.439,544] <wrn> bt_gatt: Device is not subscribed to characteristic
    HL [00:00:01.439,544] <wrn> bt_pacs: PACS notify failed: -22
    HL [00:00:05.439,147] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:05.839,935] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:05.839,935] <inf> unicast_server:     Frequency: 48000 Hz
    HL [00:00:05.839,935] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:05.839,935] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:05.839,935] <inf> unicast_server:     Octets per frame: 120 (96000 bps)
    HL [00:00:05.839,965] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:05.999,847] <inf> main: Presentation delay 10000 us is set by initiator
    Invalid PLC method
    exit
    HL [00:00:07.716,064] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    --- 116 messages dropped ---
    HL [00:00:07.735,534] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.736,968] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.746,093] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.756,072] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.767,517] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.785,552] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.786,956] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.796,081] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.806,091] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.826,080] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.836,975] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:07.839,691] <err> bt_mgmt_ctlr_cfg: No response from IPC or controller
    HL [00:00:07.839,691] <err> bt_mgmt_ctlr_cfg: ERR_CHK Err_code: [-116] @ line: 164
    HL [00:00:07.839,721] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000020  r2/a3:  0x0000001f
    HL [00:00:07.839,721] <err> os: r3/a4:  0x0006952d r12/ip:  0x20004f28 r14/lr:  0x000695b7
    HL [00:00:07.839,752] <err> os:  xpsr:  0x61000025
    HL [00:00:07.839,752] <err> os: s[ 0]:  0x000000a4  s[ 1]:  0x00000200  s[ 2]:  0x00000200  s[ 3]:  0x01000003
    HL [00:00:07.839,752] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x20004fc8  s[ 6]:  0x00000000  s[ 7]:  0x0001207f
    HL [00:00:07.839,782] <err> os: s[ 8]:  0x0001204d  s[ 9]:  0x0006394f  s[10]:  0x20004fc8  s[11]:  0x00000000
    HL [00:00:07.839,782] <err> os: s[12]:  0x0000003e  s[13]:  0x00000000  s[14]:  0x0003eb7b  s[15]:  0x000636c7
    HL [00:00:07.839,782] <err> os: fpscr:  0x00000000
    HL [00:00:07.839,813] <err> os: Faulting instruction address (r15/pc): 0x000077ba
    HL [00:00:07.839,813] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HL [00:00:07.839,843] <err> os: Fault during interrupt handling
    
    HL [00:00:07.839,843] <err> os: Current thread: 0x20003d20 (LE_AUDIO_MSG_SUB)
    HL [00:00:07.839,874] <err> error_handler: Caught system error -- reason 3. Entering infinite loop

    Regarding the issue observed, does the problem indicated in the logs mean that the size allocated for the LE_AUDIO_MSG_SUB is still not sufficient? Additionally, I would like to inquire whether it's possible to configure the LE_AUDIO_MSG_SUB size differently for the gateway and the headsets. This differentiation could potentially help in fine-tuning the system's performance and stability.

    I'm eager to hear your thoughts on both matters and any potential solutions or troubleshooting steps you might recommend.

    Thank you once again for your support and patience.

    Best regards,

    Runqi

  • Hi, 

    According to the log from the headset, seems the controller just crashed. 

    runqi said:
    I have been using the nRF5340 audio application and have made some modifications to it.

    Could you elaborate on the details of your modifications in the v2.6.0 audio application? Sinpped code/config files would also help. 

    -Amanda H.

  • Hi Amanda,

    I apologize for the delayed reply.

    Thank you for pointing out the issue with the controller crash in the headset log. Based on your feedback, I scrutinized my code and successfully corrected the error that was causing the previous issue.

    Currently, the situation with the devices is as follows:

    On the gateway, LED1 is blinking blue, and LED3 is blinking green.

    Both headsets show LED1 blinking blue, LED2 constantly lit in green, and LED3 blinking green.

    The logs for the gateway are showing multiple instances of "I2S RX overrun. Single msg," along with several message drops. Here are the details:

    GW [00:00:00.267,944] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.320,373] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Tue Apr 16 13:21:10 2024
    GW [00:00:00.320,404] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.320,404] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.341,156] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    GW [00:00:00.341,369] <inf> bt_mgmt: Local identity addr: F1:53:CB:A1:37:61 (random)
    GW [00:00:00.352,447] <inf> bt_mgmt_scan: All bonded slots filled, will not accept new devices
    GW [00:00:00.354,766] <inf> bt_mgmt_scan: Local addr: 77:68:BE:70:36:A3 (random). May time out. Updates not printed
    GW [00:00:00.354,766] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.804,260] <inf> bt_mgmt_scan: Creating connection to bonded device: D4:3B:14:F0:11:28 (random)
    GW [00:00:00.811,981] <inf> bt_mgmt: Connected: D4:3B:14:F0:11:28 (random)
    GW [00:00:00.812,103] <inf> bt_mgmt_scan: All bonded slots filled, will not accept new devices
    GW [00:00:00.813,201] <inf> bt_mgmt_scan: Local addr: 77:68:BE:70:36:A3 (random). May time out. Updates not printed
    GW [00:00:00.813,201] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.813,232] <inf> main: Device connected
    GW [00:00:00.833,404] <inf> bt_mgmt_scan: Creating connection to bonded device: E4:0A:37:69:AE:56 (random)
    GW [00:00:00.884,552] <inf> bt_mgmt: Connected: E4:0A:37:69:AE:56 (random)
    GW [00:00:00.884,582] <inf> main: Device connected
    GW [00:00:01.092,010] <inf> main: Security changed
    GW [00:00:01.202,026] <inf> main: Security changed
    GW [00:00:01.802,337] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:01.812,225] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:03.613,433] <inf> unicast_client: RIGHT sink stream configured
    GW [00:00:03.643,432] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:03.692,749] <inf> unicast_client: Enable stream 0x20004bf0
    GW [00:00:03.722,747] <inf> unicast_client: Enable stream 0x20004988
    GW [00:00:04.012,054] <inf> unicast_client: Stream 0x20004bf0 started
    GW [00:00:04.044,708] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 2 messages dropped ---
    GW [00:00:04.114,685] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:04.219,696] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:04.324,707] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 6 messages dropped ---
    GW [00:00:04.467,803] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 8 messages dropped ---
    GW [00:00:04.611,877] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 4 messages dropped ---
    GW [00:00:04.709,899] <wrn> audio_datapath: I2S RX continuing stream
    --- 7 messages dropped ---
    GW [00:00:04.830,902] <wrn> audio_datapath: I2S RX overrun. Single msg
    ...

    On the headsets' side, the logs are showing:

    HL [00:00:00.319,488] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Tue Apr 16 13:20:42 2024
    HL [00:00:00.319,519] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.319,519] <inf> fw_info: HEADSET left device
    HL [00:00:00.339,294] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.339,477] <inf> bt_mgmt: Local identity addr: E4:0A:37:69:AE:56 (random)
    HL [00:00:00.354,064] <inf> bt_mgmt_adv: Local addr: 69:AA:C0:29:40:AF (random)
    HL [00:00:00.354,125] <inf> bt_mgmt_adv: Adv directed to: F1:53:CB:A1:37:61 (random).
    HL [00:00:00.354,736] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.885,070] <inf> bt_mgmt: Connected: F1:53:CB:A1:37:61 (random)
    HL [00:00:00.885,101] <inf> main: Connected
    HL [00:00:00.885,498] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HL [00:00:00.885,589] <inf> bt_mgmt_adv: Local addr: 69:AA:C0:29:40:AF (random)
    HL [00:00:01.412,200] <inf> main: Security changed
    HL [00:00:01.412,445] <wrn> bt_gatt: Device is not subscribed to characteristic
    HL [00:00:01.412,445] <wrn> bt_pacs: PACS notify failed: -22
    HL [00:00:05.412,048] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:05.812,835] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:05.812,835] <inf> unicast_server:     Frequency: 48000 Hz
    HL [00:00:05.812,835] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:05.812,835] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:05.812,835] <inf> unicast_server:     Octets per frame: 120 (96000 bps)
    HL [00:00:05.812,835] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:05.972,747] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.539,276] <inf> unicast_server: Stream 0x2000f850 started
    HL [00:00:06.549,987] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.559,997] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.569,976] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.581,237] <wrn> audio_datapath: Data received, total under-runs: 4
    HL [00:00:06.639,221] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:06.739,227] <inf> audio_datapath: Drft comp state: INIT
    HL [00:00:06.740,234] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:06.840,240] <inf> audio_datapath: Drft comp state: OFFSET
    HL [00:00:07.071,960] <wrn> audio_datapath: Data received, total under-runs: 5
    HL [00:00:07.439,788] <inf> audio_datapath: Drft comp state: LOCKED
    HL [00:00:07.440,490] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:07.550,506] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:07.698,516] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:07.700,500] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:07.810,485] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:07.949,951] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:07.959,075] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.069,061] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.210,479] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.230,072] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.340,179] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.469,085] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.490,051] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.600,067] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.740,081] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.749,969] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.858,520] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:09.000,061] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:09.008,544] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:09.118,530] <inf> audio_datapath: Pres comp state: LOCKED
    

    Additionally, the headsets stopped updating their logs after the those initial entries.

    Given these issues, it seems like there might be an I2S RX overrun problem. Should I also consider modifying the size of the I2S RX buffer to address this?

    Thank you for your continued support and guidance.

    Best regards,

    Runqi

Reply
  • Hi Amanda,

    I apologize for the delayed reply.

    Thank you for pointing out the issue with the controller crash in the headset log. Based on your feedback, I scrutinized my code and successfully corrected the error that was causing the previous issue.

    Currently, the situation with the devices is as follows:

    On the gateway, LED1 is blinking blue, and LED3 is blinking green.

    Both headsets show LED1 blinking blue, LED2 constantly lit in green, and LED3 blinking green.

    The logs for the gateway are showing multiple instances of "I2S RX overrun. Single msg," along with several message drops. Here are the details:

    GW [00:00:00.267,944] <inf> board_version: Compatible board/HW version found: 1.0.0
    GW [00:00:00.320,373] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Tue Apr 16 13:21:10 2024
    GW [00:00:00.320,404] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.320,404] <inf> fw_info: Compiled for GATEWAY device
    GW [00:00:00.341,156] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    GW [00:00:00.341,369] <inf> bt_mgmt: Local identity addr: F1:53:CB:A1:37:61 (random)
    GW [00:00:00.352,447] <inf> bt_mgmt_scan: All bonded slots filled, will not accept new devices
    GW [00:00:00.354,766] <inf> bt_mgmt_scan: Local addr: 77:68:BE:70:36:A3 (random). May time out. Updates not printed
    GW [00:00:00.354,766] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.804,260] <inf> bt_mgmt_scan: Creating connection to bonded device: D4:3B:14:F0:11:28 (random)
    GW [00:00:00.811,981] <inf> bt_mgmt: Connected: D4:3B:14:F0:11:28 (random)
    GW [00:00:00.812,103] <inf> bt_mgmt_scan: All bonded slots filled, will not accept new devices
    GW [00:00:00.813,201] <inf> bt_mgmt_scan: Local addr: 77:68:BE:70:36:A3 (random). May time out. Updates not printed
    GW [00:00:00.813,201] <inf> bt_mgmt_scan: Scanning successfully started
    GW [00:00:00.813,232] <inf> main: Device connected
    GW [00:00:00.833,404] <inf> bt_mgmt_scan: Creating connection to bonded device: E4:0A:37:69:AE:56 (random)
    GW [00:00:00.884,552] <inf> bt_mgmt: Connected: E4:0A:37:69:AE:56 (random)
    GW [00:00:00.884,582] <inf> main: Device connected
    GW [00:00:01.092,010] <inf> main: Security changed
    GW [00:00:01.202,026] <inf> main: Security changed
    GW [00:00:01.802,337] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:01.812,225] <inf> bt_rend_vol: VCS discover finished
    GW [00:00:03.613,433] <inf> unicast_client: RIGHT sink stream configured
    GW [00:00:03.643,432] <inf> unicast_client: LEFT sink stream configured
    GW [00:00:03.692,749] <inf> unicast_client: Enable stream 0x20004bf0
    GW [00:00:03.722,747] <inf> unicast_client: Enable stream 0x20004988
    GW [00:00:04.012,054] <inf> unicast_client: Stream 0x20004bf0 started
    GW [00:00:04.044,708] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 2 messages dropped ---
    GW [00:00:04.114,685] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:04.219,696] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 7 messages dropped ---
    GW [00:00:04.324,707] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 6 messages dropped ---
    GW [00:00:04.467,803] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 8 messages dropped ---
    GW [00:00:04.611,877] <wrn> audio_datapath: I2S RX overrun. Single msg
    --- 4 messages dropped ---
    GW [00:00:04.709,899] <wrn> audio_datapath: I2S RX continuing stream
    --- 7 messages dropped ---
    GW [00:00:04.830,902] <wrn> audio_datapath: I2S RX overrun. Single msg
    ...

    On the headsets' side, the logs are showing:

    HL [00:00:00.319,488] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.6.0                            
             Cmake run : Tue Apr 16 13:20:42 2024
    HL [00:00:00.319,519] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.319,519] <inf> fw_info: HEADSET left device
    HL [00:00:00.339,294] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 5.4 (0x0d), Revision 8591
    HL [00:00:00.339,477] <inf> bt_mgmt: Local identity addr: E4:0A:37:69:AE:56 (random)
    HL [00:00:00.354,064] <inf> bt_mgmt_adv: Local addr: 69:AA:C0:29:40:AF (random)
    HL [00:00:00.354,125] <inf> bt_mgmt_adv: Adv directed to: F1:53:CB:A1:37:61 (random).
    HL [00:00:00.354,736] <inf> bt_mgmt_adv: Advertising successfully started
    HL [00:00:00.885,070] <inf> bt_mgmt: Connected: F1:53:CB:A1:37:61 (random)
    HL [00:00:00.885,101] <inf> main: Connected
    HL [00:00:00.885,498] <inf> bt_mgmt_adv: RPA (Resolvable Private Address) expired.
    HL [00:00:00.885,589] <inf> bt_mgmt_adv: Local addr: 69:AA:C0:29:40:AF (random)
    HL [00:00:01.412,200] <inf> main: Security changed
    HL [00:00:01.412,445] <wrn> bt_gatt: Device is not subscribed to characteristic
    HL [00:00:01.412,445] <wrn> bt_pacs: PACS notify failed: -22
    HL [00:00:05.412,048] <inf> bt_content_ctrl_media: Discovery of MCS finished
    HL [00:00:05.812,835] <inf> unicast_server: LC3 codec config for sink:
    HL [00:00:05.812,835] <inf> unicast_server:     Frequency: 48000 Hz
    HL [00:00:05.812,835] <inf> unicast_server:     Duration: 10000 us
    HL [00:00:05.812,835] <inf> unicast_server:     Channel allocation: 0x1
    HL [00:00:05.812,835] <inf> unicast_server:     Octets per frame: 120 (96000 bps)
    HL [00:00:05.812,835] <inf> unicast_server:     Frames per SDU: 1
    HL [00:00:05.972,747] <inf> main: Presentation delay 10000 us is set by initiator
    HL [00:00:06.539,276] <inf> unicast_server: Stream 0x2000f850 started
    HL [00:00:06.549,987] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.559,997] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.569,976] <wrn> le_audio_rx: Not in streaming state, throwing data: 1
    HL [00:00:06.581,237] <wrn> audio_datapath: Data received, total under-runs: 4
    HL [00:00:06.639,221] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:06.739,227] <inf> audio_datapath: Drft comp state: INIT
    HL [00:00:06.740,234] <inf> audio_datapath: Drft comp state: CALIB
    HL [00:00:06.840,240] <inf> audio_datapath: Drft comp state: OFFSET
    HL [00:00:07.071,960] <wrn> audio_datapath: Data received, total under-runs: 5
    HL [00:00:07.439,788] <inf> audio_datapath: Drft comp state: LOCKED
    HL [00:00:07.440,490] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:07.550,506] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:07.698,516] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:07.700,500] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:07.810,485] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:07.949,951] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:07.959,075] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.069,061] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.210,479] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.230,072] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.340,179] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.469,085] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.490,051] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.600,067] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:08.740,081] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:08.749,969] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:08.858,520] <inf> audio_datapath: Pres comp state: WAIT
    HL [00:00:09.000,061] <inf> audio_datapath: Pres comp state: INIT
    HL [00:00:09.008,544] <inf> audio_datapath: Pres comp state: MEAS
    HL [00:00:09.118,530] <inf> audio_datapath: Pres comp state: LOCKED
    

    Additionally, the headsets stopped updating their logs after the those initial entries.

    Given these issues, it seems like there might be an I2S RX overrun problem. Should I also consider modifying the size of the I2S RX buffer to address this?

    Thank you for your continued support and guidance.

    Best regards,

    Runqi

Children
  • Hi, 

    Could you create a new support case for the new issue which is away from the original scope?

    Please elaborate on the medication and how to reproduce the issue in the new support case. 

    For us, I2S RX overrun means the nRF5340 doesn't get the data from I2S properly, so the gateway has nothing to send. Since there's nothing to send, the headset received nothing, the compensation mechanism doesn't have a packet for reference, and that causes the presentation compensation to keep triggering.

    Regards,
    Amanda H.

Related