CS47L63: Failed to reset CS47L63

Hey Nordic Team,

I'm facing an issue while flashing the audio application on our custom PCB. The interfaces of the custom PCB pretty much match those of nRF5340 Audio DK. However, when I try to flash the audio application, it throws this error

HL [00:00:02.548,461] <err> CS47L63: Failed to reset CS47L63
HL [00:00:02.548,461] <err> audio_system: Failed to initialize HW codec: -6
HL [00:00:02.548,461] <err> main: ERR_CHK Err_code: [-6] @ line: 535
HL [00:00:02.548,492] <err> os: r0/a1:  0x00000003  r1/a2:  0x0000000c  r2/a3:  0x0000000b
HL [00:00:02.548,492] <err> os: r3/a4:  0x00000003 r12/ip:  0x20003b20 r14/lr:  0x000539a9
HL [00:00:02.548,492] <err> os:  xpsr:  0x29100000
HL [00:00:02.548,492] <err> os: s[ 0]:  0x00063154  s[ 1]:  0x00053a61  s[ 2]:  0x0003453d  s[ 3]:  0x00000004
HL [00:00:02.548,522] <err> os: s[ 4]:  0x2001c608  s[ 5]:  0x0003453d  s[ 6]:  0x0003453d  s[ 7]:  0x2001c608
HL [00:00:02.548,522] <err> os: s[ 8]:  0x2001c5d0  s[ 9]:  0xffffffff  s[10]:  0xffffffff  s[11]:  0x00053aa5
HL [00:00:02.548,522] <err> os: s[12]:  0x00063f6c  s[13]:  0x00063b40  s[14]:  0xfffffffa  s[15]:  0x00000217
HL [00:00:02.548,522] <err> os: fpscr:  0x0003453d
HL [00:00:02.548,553] <err> os: Faulting instruction address (r15/pc): 0x00002694
HL [00:00:02.548,553] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
HL [00:00:02.548,583] <err> os: Current thread: 0x20005ed0 (main)
HL [00:00:02.548,583] <err> error_handler: Caught system error -- reason 3. Entering infinite loop

Now if I isolate the hw_codec part and move only that part to a separate project and flash that, it works perfectly fine.

PS: when i try to print the cs47l63_driver id once its passed to the initializing function, it shows 0x00 instead of the actual id.

Parents
  • Hi,

    There was hardware limitation for the nrf5340_audio-dk hardware v1.0.0 where it was possible that CS47L63 AD-DA converter fails to start. Can you check if workaround described on the linked page fixes the issue in your case?

    Have you made any changes to hw_codec_init()?

    Best regards,
    Dejan

  • Hey,

    I tried the workaround, it didn't work either. I'm getting the same error of Failed to initialize HW codec.

    Have you made any changes to hw_codec_init()?

    No, I haven't made any changes to the hw_codec_init function. As I said, isolating the same function and running it separately works perfectly fine. I even tried isolating and printing the device id, it prints correctly, but with the audio application it just prints 0x00.

  • Hi,

    SohamGhugare said:
    isolating the same function and running it separately works perfectly fine. I even tried isolating and printing the device id, it prints correctly, but with the audio application it just prints 0x00.

    Can you provide additional details about this? What did you do exactly when you isolated the function, and it ran fine? Which board did you use for testing?

    Can you provide full application log?

    Best regards,
    Dejan

  • Can you provide additional details about this? What did you do exactly when you isolated the function, and it ran fine?

    Took the codec files, put them in a separate project and called the hw_codec_init() function, thats it. This works perfectly fine without any errors, and I even tried writing a tone generator config to the codec and that worked as well. 

    Which board did you use for testing?

    We are using our custom PCB for testing, the interfaces are quite the same as the nRF5340 Audio DK. (I'm attaching the PCB images below)

    This is everything I have noticed with the audio application as of now:

    (Toolchain v2.9.0, SDK v2.9.0): The entire application code works perfectly fine on the audio dk. But on custom PCB, the HW Codec fails to initialize in the application code, however if I run the hw codec code separately without enabling any other interfaces, it works perfectly fine.

    Can you provide full application log?

    Here's the entire application log

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    
    HL [00:00:02.254,852] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.9.0                            
             Cmake run : Sun Mar 09 00:25:22 2025
    HL [00:00:02.254,852] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:02.254,882] <inf> fw_info: HEADSET left device
    HL [00:00:02.329,437] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8299
    HL [00:00:02.329,650] <inf> bt_mgmt: Local identity addr: FD:6E:86:18:20:38 (random)
    HL [00:00:02.548,431] <err> CS47L63: Failed to reset CS47L63
    HL [00:00:02.548,431] <err> audio_system: Failed to initialize HW codec: -6
    HL [00:00:02.548,431] <err> main: ERR_CHK Err_code: [-6] @ line: 634
    HL [00:00:02.548,461] <err> os: r0/a1:  0x00000003  r1/a2:  0x0000000c  r2/a3:  0x0000000b
    HL [00:00:02.548,461] <err> os: r3/a4:  0x00000003 r12/ip:  0x20003ba8 r14/lr:  0x0005485d
    HL [00:00:02.548,461] <err> os:  xpsr:  0x29100000
    HL [00:00:02.548,461] <err> os: s[ 0]:  0x00063bc4  s[ 1]:  0x00054915  s[ 2]:  0x000353a5  s[ 3]:  0x00000004
    HL [00:00:02.548,492] <err> os: s[ 4]:  0x2001c6c8  s[ 5]:  0x000353a5  s[ 6]:  0x000353a5  s[ 7]:  0x2001c6c8
    HL [00:00:02.548,492] <err> os: s[ 8]:  0x2001c690  s[ 9]:  0xffffffff  s[10]:  0xffffffff  s[11]:  0x00054959
    HL [00:00:02.548,492] <err> os: s[12]:  0x000649d0  s[13]:  0x000645cc  s[14]:  0xfffffffa  s[15]:  0x0000027a
    HL [00:00:02.548,492] <err> os: fpscr:  0x000353a5
    HL [00:00:02.548,522] <err> os: Faulting instruction address (r15/pc): 0x000028f8
    HL [00:00:02.548,522] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HL [00:00:02.548,553] <err> os: Current thread: 0x20005f58 (main)
    HL [00:00:02.548,553] <err> error_handler: Caught system error -- reason 3. Entering infinite loop

    PCB Images:

Reply
  • Can you provide additional details about this? What did you do exactly when you isolated the function, and it ran fine?

    Took the codec files, put them in a separate project and called the hw_codec_init() function, thats it. This works perfectly fine without any errors, and I even tried writing a tone generator config to the codec and that worked as well. 

    Which board did you use for testing?

    We are using our custom PCB for testing, the interfaces are quite the same as the nRF5340 Audio DK. (I'm attaching the PCB images below)

    This is everything I have noticed with the audio application as of now:

    (Toolchain v2.9.0, SDK v2.9.0): The entire application code works perfectly fine on the audio dk. But on custom PCB, the HW Codec fails to initialize in the application code, however if I run the hw codec code separately without enabling any other interfaces, it works perfectly fine.

    Can you provide full application log?

    Here's the entire application log

    *** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    
    HL [00:00:02.254,852] <inf> fw_info: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.9.0                            
             Cmake run : Sun Mar 09 00:25:22 2025
    HL [00:00:02.254,852] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:02.254,882] <inf> fw_info: HEADSET left device
    HL [00:00:02.329,437] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8299
    HL [00:00:02.329,650] <inf> bt_mgmt: Local identity addr: FD:6E:86:18:20:38 (random)
    HL [00:00:02.548,431] <err> CS47L63: Failed to reset CS47L63
    HL [00:00:02.548,431] <err> audio_system: Failed to initialize HW codec: -6
    HL [00:00:02.548,431] <err> main: ERR_CHK Err_code: [-6] @ line: 634
    HL [00:00:02.548,461] <err> os: r0/a1:  0x00000003  r1/a2:  0x0000000c  r2/a3:  0x0000000b
    HL [00:00:02.548,461] <err> os: r3/a4:  0x00000003 r12/ip:  0x20003ba8 r14/lr:  0x0005485d
    HL [00:00:02.548,461] <err> os:  xpsr:  0x29100000
    HL [00:00:02.548,461] <err> os: s[ 0]:  0x00063bc4  s[ 1]:  0x00054915  s[ 2]:  0x000353a5  s[ 3]:  0x00000004
    HL [00:00:02.548,492] <err> os: s[ 4]:  0x2001c6c8  s[ 5]:  0x000353a5  s[ 6]:  0x000353a5  s[ 7]:  0x2001c6c8
    HL [00:00:02.548,492] <err> os: s[ 8]:  0x2001c690  s[ 9]:  0xffffffff  s[10]:  0xffffffff  s[11]:  0x00054959
    HL [00:00:02.548,492] <err> os: s[12]:  0x000649d0  s[13]:  0x000645cc  s[14]:  0xfffffffa  s[15]:  0x0000027a
    HL [00:00:02.548,492] <err> os: fpscr:  0x000353a5
    HL [00:00:02.548,522] <err> os: Faulting instruction address (r15/pc): 0x000028f8
    HL [00:00:02.548,522] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
    HL [00:00:02.548,553] <err> os: Current thread: 0x20005f58 (main)
    HL [00:00:02.548,553] <err> error_handler: Caught system error -- reason 3. Entering infinite loop

    PCB Images:

Children
Related