6 Replies Latest reply on Oct 21, 2020 1:17 AM by user_4767881

    CYBT-353027 Headset I2S not working properly

    user_4767881

      I want to wire a CYBT-353027-EVAL to the CODEC MAX 98090 via I2S running the Headset Demo Application.

       

      Try #1: CYBT-353027 is I2S Master

      I programmed the Headset app into the BT module and paired it to a cell phone. I wired the I2S to the MAX 98090 Eval Board. I started a music player on the phone. As a consequence, I can hear music in the earphones connected to the MAX 98090. I can also see that there is an I2S BCLK, I2S LRCLK and I2S Data going on using a Logic Analyzer. The LRCLK rate is 48 kHz.

      I ended the music player app on the phone an initiated a phone call to another cell phone. The I2S BCLK and I2S LRCLK changed. The LRCLK is now running on 16 kHz. However, there is *nothing* to be seen on the SDIN and SDOUT lines. I disconnected the SDIN and SDOUT lines and, funny enough, there is a signal on the SDOUT line at least.

      I assumed, it is pulled to low by the MAX 98090 CODEC.

       

      So I decided to change the roles and make the CODEC the I2S master and the BT module the slave.

       

      Try #2: MAX 98090 is I2S Master

      I changed the source code to make the Headset Demo app configure the BT module as I2S Slave and set up the MAX 98090 as I2S master, running the LRCLK at 16 kHz with BCLK set to 64 x fs and an MCLK of 12 MHz.

      I checked with the music player app on the phone - it works (although the sound is too loud and clipped).

      I tried to make a phone call and again - nothing is on SDIN and SDOUT.

       

       

      Question: Does this even work?

      Which CODEC is recommended to use with the CYBT-353027 to get the I2S working in a bidirectional manner?

        • 1. Re: CYBT-353027 Headset I2S not working properly
          ChunleiL_51

          Hi,

           

          CYBT-353027-EVAL uses CYW20706. And we provide the code example Audio for CYW20706 reference.

          You can look into the code example to see how I2S is configured and you may also try to program that code example to CYBT-353027-EVAL because they uses the same chip.

          You may better initiate the code example using "File => New => ModusToolbox Application" in ModusToolbox. Choose the board CYW920706WCDEVAL instead.

           

          Best regards

          • 2. Re: CYBT-353027 Headset I2S not working properly
            user_4767881

            I tried to install ModusToolbox on my Linux developer workstation. Unfortunately, it is impossible to clone the wiced_btsdk on Linux due to a problem with an unsupported parameter.

             

            I tried it on Windows, where it is at least possible to clone the wiced_btsdk as well as the Audio project for the CYW920706WCDEVAL. It is also possible to compile it.

             

            Nevertheless, it is impossible to flash the created binary (or HEX) file to the target as it is not being found although it is connected to USB and I can even contact it with putty.exe. So, it is there but your software is unable to do anything with it. Probably because it is not a CYW920706WCDEVAL but a CYBT-353027-EVAL instead.

            It keeps telling me to press and hold the Recovery button, the press an release the Reset button and then release the Recovery button. I tried that. It has no effect. It won't work.

             

            I reconnected the module to my Linux PC and used the command line tool ChipLoad to flash the old firmware that I compiled with WICED Studio. At least this still works. However, the I2S is not going to be Slave (although you claim that your module can play that role).

             

            But let me ask you a question: I would have assumed that you as company Cypress are interested in other companies to get going with you products so that they will base their devices on your modules. But the reality is that I'm struggling now for 2 weeks to get your module (that I purchased for quite some money) going with an I2S/USB bridge from SiLabs, with a I2S/Analog Codec from Maxim and now with a I2S/USB bridge from C-media.

            You've turned the feature to ask for technical support off on your website because of Covid-19. Ridiculous.

             

            I'm not spending any more time on your module unless you provide feedback that enables me to get it going within 2 days max. I'm going to use the BT module from Microchip instead, they seem to be more customer-oriented.

            • 3. Re: CYBT-353027 Headset I2S not working properly
              ChunleiL_51

              Hi,

               

              You may try to specify the port COMxx to see if your device can be found while programming it using ModusToolbox. Because now you actually don't use CYW920706WCDEVAL, so mannually specify the port COMxx in the file makefile listed under the root of your project can help with it, or ModusToolbox won't recognize it using auto-discovery process.

              To do this, follow the c) step in this post:

              Re: Cannot program CYW920721B2EVK-02 Evaluation Kit

               

              Best regards

              • 4. Re: CYBT-353027 Headset I2S not working properly
                user_4767881

                I see COM9 and COM10 in the Device Manager.

                cybt-353027-bt-com-ports.png

                However, when I modify the makefile as you told me to and state COM9 instead of AUTO, I get the followwing error messages when trying to program the binary into the module:

                 

                hex file is newer than elf, skipping post-build operations

                make clean to refresh hex if needed

                 

                 

                Programming target device ...

                 

                 

                Found serial port : COM9

                 

                 

                Downloading FW ...

                Failed to execute DownloadMinidriver command

                Download failed

                 

                 

                If the serial port was not detected, make sure no other program such as ClientControl has the port open.

                 

                 

                If you have issues downloading to the kit, follow the steps below:

                 

                 

                Press and hold the 'Recover' button on the kit.

                Press and hold the 'Reset' button on the kit.

                Release the 'Reset' button.

                make[1]: *** [../../../wiced_btsdk/dev-kit/baselib/20706A2/make/recipe/program.mk:102: qprogram] Error 1

                After one second, release the 'Recover' button.

                make: *** [../../../wiced_btsdk/dev-kit/baselib/20706A2/make/core/main.mk:350: secondstage] Error 2

                • 5. Re: CYBT-353027 Headset I2S not working properly
                  ChunleiL_51

                  Hi,

                   

                  You might paste / alter the .hex file in the output directory of your project before.

                  Please run "make clean" or choose the equivalent item in ModusToolbox to clean your project. Then rebuild to see if the error goes.

                   

                  Best regards

                  • 6. Re: CYBT-353027 Headset I2S not working properly
                    user_4767881

                    After updating to git 2.28.0 I'm now able to use the ModusToolbox IDE on Linux, so I switched back to Linux.

                     

                    I did a "Clean Audio_Headset Application", followed by a "Build Audio_Headset Application" and then a "Audio_Headset Program". I still get errors:

                     

                    Programming target device ...   
                    Detecting serial port ...
                    Found serial port : /dev/ttyACM0 
                    Downloading FW ...
                    Failed to execute DownloadMinidriver command 
                    Download failed 

                    make[1]: *** [qprogram] Error 1
                    make: *** [secondstage_build] Error 2

                    If the serial port was not detected, make sure no other program such as ClientControl has the port open. 

                    If you have issues downloading to the kit, follow the steps below: 

                    Press and hold the 'Recover' button on the kit.
                    Press and hold the 'Reset' button on the kit.
                    Release the 'Reset' button.
                    After one second, release the 'Recover' button.

                    ../mtb_shared/wiced_btsdk/dev-kit/baselib/20706A2/release-v2.8.0/make/recipe/program.mk:100: recipe for target 'qprogram' failed
                    ../mtb_shared/core-make/release-v1.5.0/make/core/main.mk:413: recipe for target 'secondstage_build' failed

                    As you can see, the port is being found (/dev/ttyACM0) but then there are apparentlich problems with a "DownloadMinidriver" and the Download failed.

                    I tried the recommended procedure with the Recover and  the Reset Button without success.

                     

                    It is always the same.

                     

                    The only procedure that has apparently worked was the one with the `ChipLoad` program on the command line.

                    ../wiced_tools/ChipLoad/Linux64/ChipLoad -BLUETOOLMODE -LAUNCHADDRESS 0x00000000 -PORT /dev/ttyACM0 -BAUDRATE AUTO 
                    -MINIDRIVER platforms/CYBT_353027_EVAL/uart.hex -BTP platforms/CYBT_353027_EVAL/CYBT_353027_EVAL_SFLASH.btp
                    -NODLMINIDRIVER -CONFIG build/headset-CYBT_353027_EVAL-rom-ram-Wiced-release/headset-CYBT_353027_EVAL-rom-ram-Wiced-release.hex

                    This command line has worked for the artefacts that I created with the Wiced Studio. At least I was able to program the HEX file into the chip. However, I did not succeed to modify the program in a way that it operates as an I2S Slave (my original problem that is still unsolved).

                     

                     

                    Please advise how I can manage to make the CYBT-353027 to operate in the Headset Profile (HSP) while being slave in the I2S. I don't care whether I do this with WICED Studio or ModusToolbox.