Problem with microphone array custom board Topic is solved

New to XMOS and XCore? Get started here.
inowatom
Member
Posts: 11
Joined: Fri Feb 10, 2017 11:33 am

Problem with microphone array custom board

Postby inowatom » Fri Feb 10, 2017 12:10 pm

Hi,

I have built my own version of xCORE Microphone Array but with some differences:
- I have no ethernet or usb IC on the board
- 8 mics are connected to 8C port, not 8B
- PLL_SYNC is connected to X1D35- 1L, not 4D port
- i use XEF216-512-TQ128-C20, i have changed makefile to it

I do not use leds or buttons on my board so i removed it form project. I used AN00219_app_lores_DAS_fixed (1.0.3) and app_hires as well for te start (older version also do not work).
I can properly build project and load it via debugger to the board but i can only hear noise in the heaphones (i use CS43L21-CNZ just like in the orginal project).

All supplies (2v5, 3v3, 1v0) looks ok, clocks also except PLL_SYNC - i do not see any signal on this pin which is connected to pin 5 of CS2100-CP. I can observe data signals form mics and proper clocks and signals to DAC- CS43L21.

Should i have clock signal on PLL_SYNC?

Wha should i check further to find out what is wrong? I rather think it is someting with the software than hardware but i have no idea right now.

Thank You in advance for help.
BR
Tom
View Solution
mon2
XCore Expert
Posts: 573
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Fri Feb 10, 2017 1:47 pm

Hi. Have not yet worked with the same project but hope to soon if and when Seeed delivers on their version of this microphone array. ETA keeps changing on their website.

I have built my own version of xCORE Microphone Array but with some differences:
- I have no ethernet or usb IC on the board
- 8 mics are connected to 8C port, not 8B
- PLL_SYNC is connected to X1D35- 1L, not 4D port
- i use XEF216-512-TQ128-C20, i have changed makefile to it


Your board is custom and you have changed the ports in the design. Have you also changed the source code software to map to your custom port use ? This is required.

clocks also except PLL_SYNC - i do not see any signal on this pin which is connected to pin 5 of CS2100-CP.


Yes, you should see activity on pin 5 of this device. From the datasheet, pin # 5 = Frequency Reference Clock Input (Input) - Clock input for the Digital PLL frequency reference

Also, on the CS2100-CP, do you see any activity on pin # 3 = CLK_OUT -> PLL Clock Output (Output) - PLL clock output ? You should else the PLL is not working.

This PLL is configured using pins 9 & pin 10 of the CS2100-CP (I2C/SPI port pins). Once the XMOS CPU boots the firmware, the code will configure this external PLL for the required clock values.

Do you have access to the original XMOS reference design so you can compare the signals on the same parts ? That will be helpful. Otherwise, you will have to post more details of your custom design and feedback to move forward. Aside from the above suggestions, post your schematic for a review but focus on the software changes required to support your custom PCB design. Confirm the expected values for the PLL input and output.

PS: Always nice to have at least a single LED on the project to get started on a fresh build (ie. could use simple XMOS code to flash the LED through blinky code to validate that the XMOS CPU is working correctly).
User avatar
infiniteimprobability
XCore Expert
Posts: 692
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Fri Feb 10, 2017 2:36 pm

I can observe data signals form mics and proper clocks and signals to DAC- CS43L21.

clocks also except PLL_SYNC - i do not see any signal on this pin which is connected to pin 5 of CS2100-CP.


By default, the CS2100 only passes through the MCLK for the lib_mic_array examples, so it doesn't need the PLL_SYNC signal. However, if you have a 3.072MHz mic clock coming out OK and I2S signals (XMOS is I2S master) then something is working OK. The code needs to get to the point where it configures the clock block to get BCLk and Mic CLK running, and LR clock needs I2S looping.

If you run the debugger, where is the code getting stuck?

I would echo Mon2's LED statement :) I feel lost without at least one blinky..
inowatom
Member
Posts: 11
Joined: Fri Feb 10, 2017 11:33 am

Postby inowatom » Fri Feb 10, 2017 3:17 pm

mon2 wrote:Hi. Have not yet worked with the same project but hope to soon if and when Seeed delivers on their version of this microphone array. ETA keeps changing on their website.

I have built my own version of xCORE Microphone Array but with some differences:
- I have no ethernet or usb IC on the board
- 8 mics are connected to 8C port, not 8B
- PLL_SYNC is connected to X1D35- 1L, not 4D port
- i use XEF216-512-TQ128-C20, i have changed makefile to it


Your board is custom and you have changed the ports in the design. Have you also changed the source code software to map to your custom port use ? This is required.

Yes i did, in xn file and also in the project source: app_lores_DAS_fixed.xs

clocks also except PLL_SYNC - i do not see any signal on this pin which is connected to pin 5 of CS2100-CP.


Yes, you should see activity on pin 5 of this device. From the datasheet, pin # 5 = Frequency Reference Clock Input (Input) - Clock input for the Digital PLL frequency reference

Also, on the CS2100-CP, do you see any activity on pin # 3 = CLK_OUT -> PLL Clock Output (Output) - PLL clock output ? You should else the PLL is not working.
I see PLL Clock Output and all clocks except PLL_SYNC are OK.

This PLL is configured using pins 9 & pin 10 of the CS2100-CP (I2C/SPI port pins). Once the XMOS CPU boots the firmware, the code will configure this external PLL for the required clock values.

Do you have access to the original XMOS reference design so you can compare the signals on the same parts ? That will be helpful. Otherwise, you will have to post more details of your custom design and feedback to move forward. Aside from the above suggestions, post your schematic for a review but focus on the software changes required to support your custom PCB design. Confirm the expected values for the PLL input and output.

Unfortunately i do not have, and at this moment the orginal board is unavailable in digi-key store. Hardware is OK, i have checked it several times.

PS: Always nice to have at least a single LED on the project to get started on a fresh build (ie. could use simple XMOS code to flash the LED through blinky code to validate that the XMOS CPU is working correctly).
inowatom
Member
Posts: 11
Joined: Fri Feb 10, 2017 11:33 am

Postby inowatom » Fri Feb 10, 2017 3:25 pm

infiniteimprobability wrote:
I can observe data signals form mics and proper clocks and signals to DAC- CS43L21.

clocks also except PLL_SYNC - i do not see any signal on this pin which is connected to pin 5 of CS2100-CP.


By default, the CS2100 only passes through the MCLK for the lib_mic_array examples, so it doesn't need the PLL_SYNC signal. However, if you have a 3.072MHz mic clock coming out OK and I2S signals (XMOS is I2S master) then something is working OK. The code needs to get to the point where it configures the clock block to get BCLk and Mic CLK running, and LR clock needs I2S looping.
Yes i have 3.072MHz mic clock and I2S signals.
If you run the debugger, where is the code getting stuck?

Well, it is not stucked, It works, DAC is getting new data via I2S, i hear noise in the Headphones. I can debug it step-by-step and i do not see any problems. Also i do not much experinece in Xmos chips.
Could it be the problem that i use different port for mics data??? 8C and not 8B like in the orginal project?


I would echo Mon2's LED statement :) I feel lost without at least one blinky..
User avatar
infiniteimprobability
XCore Expert
Posts: 692
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Fri Feb 10, 2017 3:32 pm

It would definitely help to use the right input port ;-)
inowatom
Member
Posts: 11
Joined: Fri Feb 10, 2017 11:33 am

Postby inowatom » Fri Feb 10, 2017 3:39 pm

infiniteimprobability wrote:It would definitely help to use the right input port ;-)

OK, why do you think i can not connect microphones to port 8C?
mon2
XCore Expert
Posts: 573
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Fri Feb 10, 2017 5:26 pm

OK, why do you think i can not connect microphones to port 8C?


You must now review the full source code and confirm that the original source code developed for port 8B is properly working for your port 8C. Also be sure that no wider port that may be a superset of 8C is not broken due to the new port mapping. In general, a great deal of thought is invested into the port mappings and then the s/w coding to be sure all work together. Do not believe the code nor schematics are public for this board so cannot confirm exactly if your port 8C is truly free to use.
inowatom
Member
Posts: 11
Joined: Fri Feb 10, 2017 11:33 am

Postby inowatom » Mon Feb 20, 2017 3:46 pm

mon2 wrote:
OK, why do you think i can not connect microphones to port 8C?


You must now review the full source code and confirm that the original source code developed for port 8B is properly working for your port 8C. Also be sure that no wider port that may be a superset of 8C is not broken due to the new port mapping. In general, a great deal of thought is invested into the port mappings and then the s/w coding to be sure all work together. Do not believe the code nor schematics are public for this board so cannot confirm exactly if your port 8C is truly free to use.


Ok, problem solved, i set in make file optimization flag to -O2 and it works fine. I previously set it to -O0 to debug and with such option app_hires_DAS_fixed do not work. At least with my board.
User avatar
infiniteimprobability
XCore Expert
Posts: 692
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Mon Feb 20, 2017 4:15 pm

Ok, problem solved, i set in make file optimization flag to -O2 and it works fine. I previously set it to -O0 to debug and with such option app_hires_DAS_fixed do not work. At least with my board.


That's good to hear. Glad it's working and thanks for sharing the solution as it could well help others. By the way, the compiler really does zero optimisation at -O0, but I guess you already know that...

Return to “Getting started”

Who is online

Users browsing this forum: No registered users and 1 guest