RT1064: USB to SAI bridge

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1064: USB to SAI bridge

1,520 Views
mrecoskie
Contributor III

Hi.  I've reviewed several provided USB Audio samples including the speaker, generator and hid_audio_unified_hid samples and observed their USB descriptor definitions.  However is it possible to see this USB definition in the 'Peripherals Tool' ?   
For example, does a sample exists showing a working USB sample through the 'Peripherals Tool'?  

Thanks.

 

Labels (1)
0 Kudos
11 Replies

1,357 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mrecoskie ,

  I already back to work, I will help you check more details about it, then give you reply!

   My understand is, one USB to more SAI, customer need to prepare the SAI data to the USB buffer.

  Now, if you use one or two SAI channel instead of 3 sai bus, whether it can transfer the USB data?

Best Regards,

kerry

0 Kudos

1,463 Views
John4933
Contributor I

Often times the usb device becomes undetectable without any indication of what is causing the error.

0 Kudos

1,484 Views
mrecoskie
Contributor III

Hi.  It would be nice to have conformation that the 'Peripherals Tool' will produce a basic working UAC solution.  

From my experience this is not the case.  I've created a complete working UAC2 definition.  In the generate code I have found that something is preventing the stream callback from being registered.  Without the callback being called USB messages from the host are not handled.    

 

 

0 Kudos

1,468 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mrecoskie 

   Please upload you complete working UAC2 definition project, then I will check it.

   And tell me how many endpoint for the UAC you need, then I will try to help you to generate it, as there no directly project based on the peripherals.

Best Regards,

Kerry

0 Kudos

1,455 Views
mrecoskie
Contributor III

Thank you.  Attached is a simple application created with the ‘Perpherals Tool’ for a USB play and record device using SAI1.  I’ve added the audio callback handling code to transfer data between USB and SAI1.

During tests the RT1064 is connected to a linux machine via USB.  The USB connects and displays the proper descriptors however there is no proper signal over the SAI Tx Data0.  

I know the hardware is good as I can run the composite_hid_audio_unified_bm sample successfully.

The final goal is to have a single USB connection which handles three separate SAI/I2S connections (1 control + 6 in/out iso endpoints).  I’ve tried to manually code this scenario but as you can imagine it can get quite large and complex … especially when it will fail during testing with no indication as to the problem.

 

0 Kudos

1,445 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mrecoskie 

   Thanks for your information.   

   So now, USB descriptors detection works, just audio data is not transfer, right?

   You mentioned:  there is no proper signal over the SAI Tx Data0.  

   I have a question, do you configure the SAI module in your project, as you know USB and SAI is the different module, if you want to send the data to the SAI, you also need to configure the SAI module, and send the USB data to the SAI buffer, do you do this operation?

 

Best Regards,

Kerry

0 Kudos

1,437 Views
mrecoskie
Contributor III

Hi Kerry,

I have configured the SAI module (and dma) as well as added code to transfer the data from the USB to SAI.  Perhaps you can confirm my method in the project?

The USB detection works however it seems the generated code prevents the usb data to be transferred.

Thanks,

Mark

 

0 Kudos

1,426 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mrecoskie ,

  Yes, I will try to test your code, and check more details about it.

  It needs more time to give you reply.

BTW, from Jan.29th to Feb 6th is our Chinese Spring Festival(Chinese New Year), so if you have any updated information, I may reply you later, thanks a lot for your understanding.
But, if you are urgent, you can create a new case at that time, as we also have colleagues located in Mexico still can provide service for you.

  Best Regards,

Kerry

0 Kudos

1,405 Views
mrecoskie
Contributor III

Yes, I understand.  Unfortunately time is a factor for us as we try to prove this chip will work for our scenario.  ie. Single UAC USB to 3 SAI buses.  Is it possible?  

Looking at it in more detail I’ve discovered that the audio stream definition in the code has room for only one iso stream in the usb_device_audio_struct_t structure even through more than one iso stream exists.  However even after correcting this it is still not working.

 

0 Kudos

1,494 Views
mrecoskie
Contributor III

Hi Kerry.  I have tried to manually extend the composite_hid_audio_unified_bm example to multiple usb iso endpoints without success.  Often times the usb device becomes undetectable without any indication of what is causing the error.  

The 'Peripherals Tool' seems very promising however I have yet to be able to use it to create a simple usb to sai example.

 

0 Kudos

1,504 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mrecoskie ,

   We don't have the direct Peripherals Tool based UAC code, we just have some cdc example, normally, we use the SDK UAC directly.

  So, you can refer to the SDK example code and modify the code directly:

SDK_2_11_0_EVK-MIMXRT1064\boards\evkmimxrt1064\usb_examples

  Wish it helps you!

Best Regards,

Kerry

0 Kudos