This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200 Audio streaming demo

Other Parts Discussed in Thread: CC3200SDK, CC3200, UNIFLASH

Hi,

I've verified below demo works.

http://processors.wiki.ti.com/index.php/CC32xx_Wifi_Audio_Application

But it works only when the execution image is flashed on both boards and the boards are reset.

If I run the demo from the code composer IDE, the demo doesn't work correctly.

Basically the demo works: The wifi connections are established as configured.

But if I press the buttons for audio streaming, the streaming doesn't work.

Am I missing something?

Regards,

WonHo

  • HI WonHo,


    How you running code on IDE. Are you using step-by-step debugging or any breakpoints after Audio_Start(); call? If yes, than that's the issue demo not working. You cant use step-by-step debugging or breakpoints after Audio_Start() call.


    Regards,
    Aashish
  • Hi Aashish,
    Thanks for your prompt reply.

    No, I don't use neither breakpoints nor step-by-step debugging.
    I just download the same execution image and simply run it from IDE.

    Regards,
    WonHo
  • Hi WonHo,


    Is it both the boards are connected to same PC? can you break the code execution after pressing audio streaming button and see value of variable SPEAKER and MIC.


    Regards,
    Aashish
  • For simplicity, I'm currently running only one board from IDE whereas the other board runs by itself.
    After the code execution and pressing both of SW2 and SW3 buttons, I checked MIC and SPEARK variables.
    Both values are zero.

    I've also added debug prints in four places in pcm_handler.c as below.

    1. Two places in DMAPingPongCompleteAppCB_opt()
    pusTxDestBuf += CB_TRANSFER_SZ;
    guiDMATransferCountTx += CB_TRANSFER_SZ;
    MIC++;
    UART_PRINT("MIC increased %d \n\r",MIC);

    2. Two places in DMAPingPongCompleteAppCB_opt()
    pusRxSrcBuf += CB_TRANSFER_SZ;
    guiDMATransferCountRx += CB_TRANSFER_SZ;
    pucDMASrc = (unsigned char *)pusRxSrcBuf;
    SPEAKER++;
    UART_PRINT("SPEAKER increased %d \n\r",SPEAKER);

    If I flash the execution image on the board and run it, I can see the variables are incremented properly.
    If I run the image from the IDE, however, I CAN'T see any debug prints.

    One important note:
    If the execution image runs by itself(not by IDE), I can see MIC variable is increased by 16(as below) during the initialization time.

    MIC increased 1
    MIC increased 2
    MIC increased 3
    MIC increased 4
    MIC increased 5
    MIC increased 6
    MIC increased 7
    MIC increased 8
    MIC increased 9
    MIC increased 10
    MIC increased 11
    MIC increased 12
    MIC increased 13
    MIC increased 14
    MIC increased 15
    MIC increased 16
    MIC increased 17
    [WLAN EVENT] STA Connected to the AP: Minsun , BSSID: 0:26:66:2c:b7:40
    [NETAPP EVENT] IP Acquired: IP=192.168.0.35 , Gateway=192.168.0.1

    If I run the same execution from IDE, however, I can't see the debug prints at all.
    I'm sure you can reproduce the same issue on your board.
    Can you tell what's the problem?

    Regards,
    WonHo
  • Hi WonHo,


    I have only one audio pack right now so I need some time to recreate same scenario. By the time I get another audio pack can you do a quick loopback test(without networking) in debugging . For loopback please refer following post
    http://e2e.ti.com/support/wireless_connectivity/f/968/p/390582/1379803#1379803


    Regards,
    Aashish
  • Hi WonHo,


    We tested scenario as your's one device running from flash and another in debug mode (IDE) and it is working perfectly fine without any issue. So we strongly suggest you once run loopback test as mentioned on last post in Debug mode.


    Regards,
    Aashish
  • Hi Aashish,

    Interestingly, I've got the same result.

    The audio Loopback basically works but it works only from the board not from the IDE.

    I suspect there might be some differences in the source code or in the environment.

    Could you please confirm if you are using the same versions below?

    1. I'm using the example that comes with CC3200SDK_1.0.0. 

    2. I've updated my CC3200 LP with servicepack_1.0.0.1.2.

    3. According to Uniflash log, the bootloader version is 2.1.4.0.

    [16:42:40] Begin GetVersion operation.
    [16:42:40] INFO: > Executing Operation: Connect
    [16:42:42] INFO: setting break signal
    [16:42:42] INFO: --- please restart the device ---
    [16:42:42] INFO: connection succeeded
    [16:42:42] INFO: getting storage list
    [16:42:42] INFO: > Executing Operation: GetVersion
    [16:42:42] INFO: reading version info
    [16:42:42] INFO: > Bootloader version: 2.1.4.0
    [16:42:42] INFO: > Chipset version: 16
    [16:42:42] INFO: > Executing Operation: Disconnect
    [16:42:42] Operation GetVersion returned.

    In addition, I'd like to share my source codes with you so you can compare it with yours.

    Could you please let me know your email address via whsung@dioiz.com?

    Regards,

    WonHo

  • Hi WonHo,

    We don't see any difference between your code and code we are using. Even we tried your .out file in debug mode and that working perfectly fine. Can you confirm you are resetting device before running in debug mode.

    Regards,

    Aashish

  • Aashish,

    I assume the resetting means pressing the reset button(SW1) on the board.

    No, I don't reset the board before I load the .out file because I didn't encounter any problem with other examples.

    But even though I reset the board, the issue still occurs.

    I noticed that DMAPingPongCompleteAppCB_opt() interrupt is very crucial for this example.

    I also noticed that this interrupt doesn't happens if the example is invoked from IDE.

    I've also checked the Menu>Run>Debug configurations>Target and tried to change several options that might be related to this issue.

    But I couldn't solve the issue.

    I suspect my Debug configurations are different to yours and are not properly set for this example.

    Is the fact that DMAPingPongCompleteAppCB_opt() is not working can be a lead for you to find the root cause

    Regards,

    WonHo

  • Hi Aashish,

    I have the same issue. Flashed binary image runs just fine, but when it is uploaded via gdb/openocd using scripts tools/gcc_scripts + mon soft_reset_halt, DMA interrupt does not work. Do you use CCS-based debugging?

    Could you please run wifi_audio_app in a loopback demo mode on a single cc3200 device using the debugger?

    The resetting issue you've mentioned is an interesting one, I've noticed that in my debugging configuration SRST isn't asserted when debug session starts. Maybe there is some peripherals that gets initialized somehow by a bootloader. I've noticed that audio codec IC's reset is connected to SRST by default, tried to connect it to PIN_61 and manually reset it -- no success. UART DMA example works just fine using debugger.
  • Hi Aashish,

    Could you please elaborate on why I can't use breakpoints after Audio_Start() call? My idea is that I can get DMA over/underrun issue, but I think at least one DMA interrupt should be issued.

    BR,
    Oleg
  • Hi user1265477,

    Do you have digital analyzer/oscilloscope around? Could you please compare I2S and I2C signals between cc3200 SoC and audio codec IC, do they differ when you run flashed binary image vs debugger-loaded one?

    BR,
    Oleg
  • Hi WonHo,

    Do you have digital analyzer/oscilloscope around? Could you please compare I2S and I2C signals between cc3200 SoC and audio codec IC, do they differ when you run flashed binary image vs debugger-loaded one?

    BR,
    Oleg
  • Just took an oscilloscope and looked at the schematics. BCLK is 512 kHz, FSYNC is 16 kHz, DOUT is 0. I guess I2S should be working without Audio Boosterpack board. There is some issue with DMA<->I2S connection when code is loaded via a gdb.
  • Seems like I've found the solution. Try to add MAP_PRCMPeripheralReset(PRCM_I2S); at the beginning of PinMuxConfig.
  • Hi Oleg,
    Thanks for your help.

    As you suggested, I added MAP_PRCMPeripheralReset(PRCM_I2S); at the beginning of PinMuxConfig.
    Unfortunately, however, the issue was not solved in my side.

    But, I can see a small change in the behavior of the sample.
    After the initialization, the value of MIC variable is increased by 17, meaning the interrupt handler(DMAPingPongCompleteAppCB_opt) works for tens of times.
    However, it doesn't run anymore.

    Regards,
    Wonho
  • Solved my problem.
    thank you so much.