XK-VOICE-L71 (XVF3610) SPI boot - Echo cancelling not working (direct sound from microphone to speaker) Topic is solved

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
CorentinL
New User
Posts: 2
Joined: Wed Jul 17, 2024 4:11 pm

XK-VOICE-L71 (XVF3610) SPI boot - Echo cancelling not working (direct sound from microphone to speaker)

Post by CorentinL »

Hello,

I am currently evaluating the different firmwares available for the XK-VOICE-L71 (XVF3610) eval kit.
The version of the firmware is 5.7.3

While everyting is fine using the xflash firmware (using xflash --factory app_xvf3610_ua_v5_7_3.xe --data data_partition_ua_evk_factory_v5_7_3.bin --boot-partition-size 0x100000), I have a strange behavior when I flash the firmware using SPI boot (python3 host/Pi/scripts/send_image_from_rpi.py bin/spi_boot/ua/app_xvf3610_ua_spi_boot_v5_7_3.bin).

When the firmware is flashed, I can hear myself from the microphone into the speaker. There is no more echo cancelling.

Could you help me with that ? As the source code is not available I can't figure out what is the issue.

Thank you.
View Solution
Luciano
Verified
New User
Posts: 3
Joined: Thu Aug 24, 2017 12:15 pm

Post by Luciano »

Hi CorentinL,
Thanks for your question. The data_partition_ua_evk_factory_v5_7_3.bin file contains some configuration settings that are read at bootup by the device. When we boot the device over SPI, the data partition is not read, as we don't expect to have a flash memory connected to the chip. One possible issue causing the behaviour you are seeing, is that the build config you are using requires the configuration settings included in the data partition.

Can you try to send the commands after booting the device using the instructions below:

1. Connect the device to the host machine
2. Configure the device on your host machine using the instructions in section 5.3 of https://www.xmos.com/download/XVF3610-U ... 5_7_3).pdf. This must be done only once.
3. On a terminal and go to the folder host of the release package
4. Go to the bin folder of the desired host platform and run the commands:

on Linux and macOS:
sudo vfctrl_usb -f ../../../data-partition/input/map_refs_to_i2s.txt
sudo vfctrl_usb -f ../../../data-partition/input/evk_dac_cmds.txt

on Windows:
vfctrl_usb -f ..\..\..\data-partition\input\map_refs_to_i2s.txt
vfctrl_usb -f ..\..\..\data-partition\input\evk_dac_cmds.txt
Let me know if these steps solve your problem. If they don't, can you post the output of the command
vfctrl_usb -d
?
CorentinL
New User
Posts: 2
Joined: Wed Jul 17, 2024 4:11 pm

Post by CorentinL »

Hello,

I manage to apply the following script : .\vfctrl_usb.exe -f ..\..\..\data-partition\input\map_refs_to_i2s.txt.
It seems to have the same performances now.

However, I didn't manage to apply the "evk_dac_cmds.txt", I get a lot of errors like this : Error : libusb_control_transfer returned libusb-dll:err [control_msg] sending control message failed, win error: Un pÚriphÚrique attachÚ au systÞme ne fonctionne pas correctement.

Can you tell me what is the script "evk_dac_cmds.txt" for ? Do I miss some features if I don't apply it ?

Thank you.


For reference, here is what I have done:

Using data_partition_ua_evk_factory_v5_7_3.bin, and then .\vfctrl_usb.exe GET_IO_MAP_AND_SHIFT, I get this :
GET_IO_MAP_AND_SHIFT:
target: USB_FROM_DEVICE_0, source: PIPELINE_OUT_0 output shift: NONE
target: USB_FROM_DEVICE_1, source: PIPELINE_OUT_1 output shift: NONE
target: I2S_FROM_DEVICE_0, source: USB_TO_DEVICE_0 output shift: NONE
target: I2S_FROM_DEVICE_1, source: USB_TO_DEVICE_1 output shift: NONE
target: REF_TO_PIPELINE_0, source: USB_TO_DEVICE_0 output shift: NONE
target: REF_TO_PIPELINE_1, source: USB_TO_DEVICE_1 output shift: NONE
target: MIC_TO_PIPELINE_0, source: MIC_IN_0 output shift: NONE
target: MIC_TO_PIPELINE_1, source: MIC_IN_1 output shift: NONE

Using python3 host/Pi/scripts/send_image_from_rpi.py bin/spi_boot/ua/app_xvf3610_ua_spi_boot_v5_7_3.bin, and then .\vfctrl_usb.exe GET_IO_MAP_AND_SHIFT, I get this :
Warning: RUN STATUS is SPIBOOT_WITH_DEFAULT_SETTINGS, the data partition has not been read
GET_IO_MAP_AND_SHIFT:
target: USB_FROM_DEVICE_0, source: PIPELINE_OUT_0 output shift: NONE
target: USB_FROM_DEVICE_1, source: PIPELINE_OUT_1 output shift: NONE
target: I2S_FROM_DEVICE_0, source: PIPELINE_OUT_0 output shift: NONE
target: I2S_FROM_DEVICE_1, source: USB_TO_DEVICE_0 output shift: NONE
target: REF_TO_PIPELINE_0, source: USB_TO_DEVICE_0 output shift: NONE
target: REF_TO_PIPELINE_1, source: USB_TO_DEVICE_1 output shift: NONE
target: MIC_TO_PIPELINE_0, source: MIC_IN_0 output shift: NONE
target: MIC_TO_PIPELINE_1, source: MIC_IN_1 output shift: NONE

Finally if I apply .\vfctrl_usb.exe -f ..\..\..\data-partition\input\map_refs_to_i2s.txt on the spi boot example, and then .\vfctrl_usb.exe GET_IO_MAP_AND_SHIFT, I get this :
Warning: RUN STATUS is SPIBOOT_WITH_DEFAULT_SETTINGS, the data partition has not been read
GET_IO_MAP_AND_SHIFT:
target: USB_FROM_DEVICE_0, source: PIPELINE_OUT_0 output shift: NONE
target: USB_FROM_DEVICE_1, source: PIPELINE_OUT_1 output shift: NONE
target: I2S_FROM_DEVICE_0, source: USB_TO_DEVICE_0 output shift: NONE
target: I2S_FROM_DEVICE_1, source: USB_TO_DEVICE_1 output shift: NONE
target: REF_TO_PIPELINE_0, source: USB_TO_DEVICE_0 output shift: NONE
target: REF_TO_PIPELINE_1, source: USB_TO_DEVICE_1 output shift: NONE
target: MIC_TO_PIPELINE_0, source: MIC_IN_0 output shift: NONE
target: MIC_TO_PIPELINE_1, source: MIC_IN_1 output shift: NONE

Which is now the same mapping as for the example with flash.
Luciano
Verified
New User
Posts: 3
Joined: Thu Aug 24, 2017 12:15 pm

Post by Luciano »

Hi,
Thanks for the quick reply. I am glad the problem is solved. The error you reported in the previous comment are due to Windows not being able to respond to the control commands quickly enough. evk_dac_cmds.txt is used to configured the DAC, so it consists of many commands. If some commands are missed the DAC may still work, for example if a command to set the volume fails, you will just hear a quieter or louder playback audio than expected.

I can propose a few solutions:

1. Do not use the "-f" option with vfctrl_usb and run each command in evk_dac_cmds.txt from the console, for example:

Code: Select all

     vfctrl_usb SET_I2C_WITH_REG 32 1 1 251 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

This will slow down the operations, and allow Windows to cope with the large number of commands.
2. Add a delay in the host application to slow down the operations when reading the commands from a text file, for example you can add
Sleep(5);
before the do_command() call in the function vfctrl_execute_cmd_list() in host\src\vfctrl\sw_xvf3610\app_xvf3610\host\dsp_control\src\host.c. You need to rebuild the vfctrl_usb if you choose this solution.

Let me know if you have more questions.