What's wrong about the boards

If you have a simple question and just want an answer.
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

What's wrong about the boards

Post by guodian »

Help me please, XMOE engineers.

I don't know what happened about our two boards. They are all built in 2i10o10****** app_usb_aud_xk_216_mc versions.

We designed our own board referenced by xCORE-200 Multichannel Audio Platform. We changed the ADC chip. I checked the signals from the oscilloscope and it's all OK such as MCLK, LRCLK, BCLK, ADC_DATA and so on. The board can be flashed, debug by steps. But when plug USB the computer can't recognize the device whether by Linux or Windows 7. Note the driver is OK.

The xCORE-200 Multichannel Audio Platform board also has the same problem. Today I flash and debug it repeatedly to find where I have modified the wrong code. At first, It's good and the computer can recognize the USB Audio device. At last, it seem like damaged and can't be recognized again. But it also can be connected with XTAG, flashed and debug by steps.

The USB seem like damaged.

In our design, I use these port(no errors when build) for some control. Some may use the USB PHY ports. Is this OK? The original code also use the XS1_PORT_8C and the USB is U-Series.

Code: Select all

on tile[0] : out port pGpio01d = XS1_PORT_1D;
on tile[0] : out port pGpio01e =  XS1_PORT_1E;
on tile[0] : out port pGpio01j  =  XS1_PORT_1J;
on tile[0] : in  port pGpio01n =  XS1_PORT_1N;
on tile[0] : in  port pGpio01o  =  XS1_PORT_1O;
on tile[0] : out port pGpio01p =  XS1_PORT_1P;
on tile[0] : out port pGpio04c = XS1_PORT_4C;
on tile[0] : out port pGpio04d = XS1_PORT_4D;
on tile[0] :        port pGpio08c = XS1_PORT_8C;
Last edited by guodian on Thu Jan 12, 2017 8:29 am, edited 1 time in total.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Hi - do you have a USB analyser? What happens on the bus?

Perhaps try a simple HID mouse app (which moves the cursor around) to test (attached). This will establish if USB has been damaged or not. All it needs is a 24MHz clock and doesn't care about other ports, so is good to establish if USB is working. If not - have you got D+ D- the right way around?

It's basically AN00129 which comes with lib_usb if you want to know what's inside.

Which tile is USB on? I'm guessing 1 since you would normally get a linker/mapper error if you tried to use the ports twice.
You do not have the required permissions to view the files attached to this post.
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

infiniteimprobability wrote:Hi - do you have a USB analyser? What happens on the bus?

Perhaps try a simple HID mouse app (which moves the cursor around) to test (attached). This will establish if USB has been damaged or not. All it needs is a 24MHz clock and doesn't care about other ports, so is good to establish if USB is working. If not - have you got D+ D- the right way around?

It's basically AN00129 which comes with lib_usb if you want to know what's inside.

Which tile is USB on? I'm guessing 1 since you would normally get a linker/mapper error if you tried to use the ports twice.
Thank you very much.

The Development Board‘s CPU was replaced and it work well now.

For our design board I download your mouse app into it then the cursor moves in small area. After I download USB audio file (e.g. app_usb_aud_xk_216_mc_2i10o10xxxxxx.xe) and plug the USB. There can't find USB audio device when input "aplay -l" but can find some XMOS audio informations in the kernel when input "sudo dmesg -c".

I don't know which tile USB is on. The XUD is on tile 1. I find all USB tile in the project and it's defined in xud.h.

Code: Select all

#if !defined(USB_TILE)
  #define USB_TILE tile[0]
#endif

  #if (XUD_SERIES_SUPPORT == XUD_U_SERIES)
    #define PORT_USB_CLK         on USB_TILE: XS1_PORT_1J
    #define PORT_USB_TXD         on USB_TILE: XS1_PORT_8A
    #define PORT_USB_RXD         on USB_TILE: XS1_PORT_8C
    #define PORT_USB_TX_READYOUT on USB_TILE: XS1_PORT_1K
    #define PORT_USB_TX_READYIN  on USB_TILE: XS1_PORT_1H
    #define PORT_USB_RX_READY    on USB_TILE: XS1_PORT_1M
  #else
Can you refer to the code in website https://www.xmos.com/published/usbaudio ... ersion=all with app_usb_aud_xk_216_mc and give me an answer?

Thank you!
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

Shall I need to modify the xn file for I changed the ADC chip? (But I didn't change the clock pins, ADC pin, I2C pins. I just use the idle pins to config the ADC chip.)
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

Hi,

Does the ADC need to be set-up?
You may have to change the reference design to set the ADC-chip up over I2C.

Cheers,
Henk
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

Yes, the ADC chip need to configured it's pins for high or low. The ADC chip have no register. I2C is used by other chip. But I didn't change the I2C wires. Now my board always can't be recognized by the computer. Or be recognized sometimes and unstable.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Have you modified the audiohw.xc file for your particular hardware? If not will still be looking for the I2C devices present on the reference design and likely timeout...
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

@infiniteimprobability, thank you.

Of cause, I know the I2C will make a system crash if no device could find. I have read the datasheet and I think my software design is OK. Take a look at my audiohw.xc (I haven't modified other files and have added my own files in the same directory and running OK). The audiohw.xc don't make some exceptions. Now I just test ADC, so I shield the DAC and wherever the I2C is used except clock. The soft is often blocked in deliver() task at if(testct(c_out)) satement.

Code: Select all

static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, const unsigned underflowWord)
{
    outuint(c_out, underflowWord);

    /* Check for sample freq change (or other command) or new samples from mixer*/
    if(testct(c_out))
    {
        unsigned command = inct(c_out);
#ifndef CODEC_MASTER
The USB is OK when I test your app. So it seems like the USB crashed and can't output LRCLK then. But I didn't modify any code except audiohw.xc.
You do not have the required permissions to view the files attached to this post.
guodian
Member++
Posts: 21
Joined: Sat Nov 12, 2016 10:48 am

Post by guodian »

We have resolved this problem. But we face a new problem now. Our particular board just can work on 1i2o2xxxxxx and 1i8o2xxxxxx version build. In these two versions, the board can record and play sound well. But when build in 2i*o******** versions it can't be recognized by computer and play sound. What's the different between Audio Class 1.0 and Audio Class 2.0 that can make different effect? How can our particular board work on advanced version of Audio Class 2.0?