Currently, I am creating a CIS-connected device using nRF5340 Audio on a homemade board.
Since the circuit configurations of the Gateway and Headset are different, I have created separate folders for each and executed the following commands on the command line.
〇Build headset
west build C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-1 -b nrf5340_audio_dk_nrf5340_cpuapp -d C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-1\build\dev_headset\build_release - DCONFIG_AUDIO_DEV=1 -DCONFIG_AUDIO_DFU=1 -DCONFIG_B0N_MINIMAL=y -DCONF_FILE=prj_release.conf
〇Build gateway
west build C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-2 -b nrf5340_audio_dk_nrf5340 _cpuapp -d C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-2\build\dev_gateway\build_release -DCONFIG_AUDIO_DEV=2 -DCONFIG_AUDIO_DFU=1 -DCONFIG_B0N_MINIMAL=y -DCONF_FILE=prj_release.conf
〇Using the debugger with serial number 1050198852, erase all user code and UICR flash areas of the network core, reset the device, and turn off APPROTECT gateway
nrfjprog --recover --coprocessor CP_NETWORK --snr 821007475
〇Using the debugger with serial number 1050188709, erase all user code and UICR flash areas of the network core, reset the device, and turn off APPROTECT headset
nrfjprog --recover --coprocessor CP_NETWORK --snr 821007475
〇Use the debugger with serial number 1050198852 to erase all user code and UICR flash areas of the application core, reset the device, and turn off APPROTECT. gateway
nrfjprog --recover --coprocessor CP_APPLICATION --snr 821007475
〇Use the debugger with serial number 1050188709 to erase all user code and UICR flash areas of the application core, reset the device, and turn off APPROTECT. headset
nrfjprog --recover --coprocessor CP_APPLICATION --snr 821007475
〇Write to the network core. gateway
nrfjprog --program C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-2\build\dev_gateway\build_release\zephyr\net_core_app_signed.hex -f NRF53 -q --snr 821007475 --sectorerase --coprocessor CP_NETWORK
〇Write to network core headset
nrfjprog --program C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-1\build\dev_headset\build_release\zephyr\net_core_app_signed.hex -f NRF53 -q --snr 821007475 --sectorerase --coprocessor CP_NETWORK
〇Write to application core gateway
nrfjprog --program C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-2\build\dev_gateway\build_release\zephyr\merged.hex -f NRF53 -q --snr 821007475 --chiperase --coprocessor CP_APPLICATION
〇 Write to application core headset
nrfjprog --program C:\Users\TSP_M1\nrf5340_audio_copy4-2-2-1\build\dev_headset\build_release\zephyr\merged.hex -f NRF53 -q --snr 821007475 --chiperase --coprocessor CP_APPLICATION
〇 Enter value 260116286 into memory address 16744688 using debugger with serial number 260116286 gateway
nrfjprog --memwr 16744688 --val 821007475 --snr 821007475
〇Use the debugger with serial number 821007475 to input the value 0 to memory address 16744692 headset
nrfjprog --memwr 16744692 --val 0 --snr 821007475
〇Use the debugger with serial number 260116286 to reset the device and run the program gateway
nrfjprog -r --snr 821007475
〇Use the debugger with serial number 821007475 to input the value 821007475 to memory address 16744688 headset
nrfjprog --memwr 16744688 --val 821007475 --snr 821007475
〇Reset the device and run the program using the debugger with serial number 821007475 headset
nrfjprog -r --snr 821007475
Now, the Gateway and Headset are connected via BLE, and it has been confirmed that the sound source is input from the Gateway and sound comes out from the Headset.
If you change the Gateway and write only to the Gateway with the above command, you will not be able to connect to BLE.
If you write to both together, it will work normally.
What is the cause?