Parameter control on lin33

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Parameter control on lin33

Postby hyuting1008 » Wed Sep 11, 2019 10:11 am

Hello,

We are using a L33 EVA Board and would like to change the parameters "BEAMWIDTH" and "BEAMANGLE" to modify the DOA range in the run time.
The control signal would come from other MCU.
Could we use the redundant ports and change their level (1 or 0) to represent different Beamwidth/Beamangle combination?
or from the documents, it seems that the I2C bus control is a regular solution.
But we couldn't figure out the exact programming/control of I2C.
Could anyone having experience on parameter control give us some advice or sample code?
We really appreciate your help.

Thanks a lot!
User avatar
mon2
XCore Legend
Posts: 1592
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Sep 11, 2019 1:32 pm

Hi. Do not have this kit and support material appears to be available only on demand and to customers of the kit through the XMOS portal.

Proceed to download all relevant hardware documents for your kit which should offer schematics for the PCBA. The landing page for the kit notes that optional control is available over I2S and I2C so it should be possible to interface with your external micro over I2C and then steer the DOA as you wish. The I2C interface is most likely already present and enabled on the kit. What you may have to consider is that the XMOS CPU is most likely an I2C bus master that is chatting with onboard I2C hardware components. However, for your project, you wish to use an external micro to offer the DOA details which most likely will also be an I2C master residing on the same bus. For this reason, if possible, make your external micro an I2C slave so that you can simply extend the L33 IP and continue to leave the XMOS as the I2C bus master.

Varying with the CPU you are using there are many such public examples on building I2C slaves, etc. and often with DMA support (ie. STM32 series, etc. offer such code examples).

The alternate plan is to insert an I2C slave component into the XMOS CPU and then use your external CPU as the I2C master but this could get complicated but not impossible to support.

Regardless, you will have to proceed to receive the access to the related documents through the XMOS portal.

Hope this helps.
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Postby hyuting1008 » Fri Nov 15, 2019 4:15 pm

Thank you for your reply.

I've read the "VocalFusion Software Design Guide". The suggested mechanism of I2C control is a slave I2C interface, where XMOS CPU is the I2C slave and is responsive to the external master, but you said it would be difficult to support...I feel confused about it.

On the other hand, I saw another user had similar question, "i2c control specification for vocalfusion".
-- viewtopic.php?f=47&t=6988&p=34610&hilit ... rry#p34610

and I also have the problem of extracting the parameters with I2C commands.

Although he seems to find another way to get through, I cannot get in touch with him so that I want to know if there is a better way like he said?

In fact, I have tried another method to control the parameters:
I used those not used port on the extension port J5, and set high(3.3V)/low(0V) voltage on those ports.
Then the parameters will be set according to different combinations of those voltage on those ports.
This can be done whenever XMOS L33 is reboot.

However, I do not know how to control those parameters...
should I use the function "BAP_SetPar" in vf_control.xc?

Sorry there are so many questions. Thank you for your attention.

I'd appreciate any information you could give me.
User avatar
mon2
XCore Legend
Posts: 1592
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Nov 15, 2019 5:10 pm

Hi. Kind of sad that you do not have this working by now. You are a very patient developer.

Based on a quick read, here is what we have found:

1) Your XMOS audio board is an I2C slave. Be sure you are uploading the proper firmware to use as an I2C slave.

2) You will need to mate an external I2C Bus Master but the small complication is that the bus master must support clock stretching.

3) Highly recommend that you follow the XMOS document "xCORE VocalFusion Control Users Guide" which details on how to use the low cost Raspberry PI 3 as the I2C Bus Master with your kit. Then proceed to send out the commands as shown on page # 12 of this document. The procedure will list the commands you send use to R/W the configuration parameters.

The above will allow you to change your requested parameters during run-time.

4) Have emailed XMOS for more details of the command structure so you can perhaps use a different I2C bus master. One idea is to apply an I2C bus analyzer (Beagle, Zeroplus, etc.) onto the I2C bus lines and snoop on the bus traffic to learn from the data stream. We have done this in the past with many products to understand the low level communication between the master & slave.

More later once we know more...
User avatar
johned
XCore Addict
Posts: 181
Joined: Tue Mar 26, 2013 12:10 pm

Postby johned » Fri Nov 15, 2019 5:15 pm

Hi,

Yes, you can control VocalFusion via i2c and there is a simple host app in lib_xbeclear\lib_xbeclear\host\control\src that shows you how to do this.
I have had customer compile this app for a number of different host processors so you should have no problems.
The easiest thing to do is to start on a Raspberry Pi and get familiar with the app then move to your target host.

Best regards,
John
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Postby hyuting1008 » Tue Nov 26, 2019 4:23 pm

Thank you for the information.


I follow the control user guide and set up the i2c control on Raspberry Pi 3 B+,

but it comes an error on step 6.3 (page 8) when I want to build i2c-gpio-param.

There is a related github issue: https://github.com/xmos/vocalfusion-rpi-setup/issues/13

and my error is same as his.

After seeing those discussion, I still do not know how to build i2c-gpio-param.

Sorry for lack of knowledge.

my kernel version is 4.19.75-v7+


Thank you!
User avatar
johned
XCore Addict
Posts: 181
Joined: Tue Mar 26, 2013 12:10 pm

Postby johned » Tue Nov 26, 2019 4:51 pm

Hi,

Yes, this is a known problem with the latest Raspbian and, as far as I know, there is no published solution.
The only option we can recommend at the moment is to use the older Raspbian (NOOBS-2018-10-11/NOOBS_v2_9_0.zip) as described here https://github.com/xmos/vocalfusion_3510_avs_setup.

Best regards,
John
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Postby hyuting1008 » Wed Dec 04, 2019 11:21 am

Hi,

It is quite weird because NOOBS is the platform to install Raspbian OS.
and follow the step on the URL will update to the latest Raspbian...

If it needs older Raspbian, downloading the older Raspbian image on SD card seems to be more correct.
Now I am trying to know version 4.4.26-v7+ described in the Control User Guide p.7 is what version in http://domoticx.com/raspberry-pi-sd-ima ... -linux-os/

Could I know how your customer move the app to their target host?

I have check the host.c and Makefile.PI, there is a device_access_i2c_rpi.c under lib_device_control to connect RPI and XMOS.
So if I want to use new target host, should I also have to write similar file? or how should I start.

Thank you for your attention.

I'd appreciate any information you could give me.
User avatar
johned
XCore Addict
Posts: 181
Joined: Tue Mar 26, 2013 12:10 pm

Postby johned » Wed Dec 04, 2019 11:34 am

Hi
I understand you comments about Noobs/Raspbian.
NOOBS-2018-10-11/NOOBS_v2_9_0.zip is the latest version of Raspbian that we have tested and can confirm works.
Yes, if you are using a different host then you will need to port the examples to your host. If you are using i2c or usb this is generally very easy.

Best regards,
John
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Postby hyuting1008 » Wed Dec 04, 2019 3:55 pm

Hi,

I use NOOBS and follow the steps on https://github.com/xmos/vocalfusion_3510_avs_setup

However, when I want to build i2c-gpio-param,
it comes out a different error as picture:
Image

Have you met the problem before?

Thank you!

Who is online

Users browsing this forum: No registered users and 0 guests