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.

CC1311R3: PDM to PCM driver

Part Number: CC1311R3
Other Parts Discussed in Thread: CC1310, SYSCONFIG

Hi, there.

We are trying to use CC1311R3 to connect to a PDM-MIC. 

My question is, I can find a driver "pdm2pcm_cc26x2_ticlang.asm" in SDK( SimpleLink CC13xx CC26xx SDK (7.10.00.98)), but I got a big noise in the PCM.

Do you have/know a driver(PDM to PCM) for CC1311R3?

Thanks.

  • Hi

    Our pdm driver is documented here:

    PDMCC26XX.h File Reference (ti.com)

    Have you noted the following:

    "Do not start steaming data until the device is running off of the high frequency external oscilator (XOSC_HF). The XOSC_HF is required to generate a jitter-free I2S audio clock. When switching to XOSC_HF, several SCLK_HF clock cycles and thus audio clock cycles are missed. Both jitter and missing audio clock cycles causes severe degredation in audio noise performance! After booting, the device runs off of the high frequency RC oscillator (RCOSC_HF) by default. Set a dependency on the XOSC_HF to turn it on and switch to it when it is ready. Register a power notification for the XOSC_HF having switched. Wait until after this notification occurs to call PDMCC26XX_startStream(). When waking up from standby, the XOSC_HF will automatically be turned on and switched to if the dependency was set before going into standby. Again, only call PDMCC26XX_startStream() after the application was notified of the switch to XOSC_HF. PDMCC26XX_open() may be called before running off of XOSC_HF."

    Siri

  • Hi, Siri

    Thanks for you help and sorry for late response.

    I've tried to switch to XOSC_HF and wait notification, then call the PDMCC26XX_startStream(),  but it didn't work. I still got a big noise floor. 

    also tried to call OSCClockSourceGet() to double check it's using XOSC_HF. 

    is there any other reason?

  • tried that, connect the D-MIC to CC1310 EVK, and use PDM driver for CC1310, there is no any issue in this case.

    so I think the problem is PDM driver of CC1311.  also tried disabled all other IRQ and Peripheral, it didn't work...

  • I will need some time to check this with R&D.  In the mean time, do you have any other CC13xx devices supported in the CC13xx CC26xx SDK, so that you can test if the problem is related to the SDK itself or to the CC1311.

    BR

    Siri

  • I have reached out to R&D and the only significant change done to the PDM driver since 2018 was the PIN->GPIO update over a year ago.

    What CC13x0 SDK are you testing with when you test the CC1310?

    Also, in addition to try another LP than the CC1311 (if you have one), can you try another version of the

    CC13xx CC26xx SDK to see if this is only a problem in 7.10?

    Are you running the “same” code on the CC1310 as on the CC1311, except using different SDKs?

    Try to make the examples as similar as possible, as that would make it easier to figure out what causing the problems on CC1311.

    When you have a small demo that gives different results on the different devices, you can share the code with us so that we can take a look. For the CC1311, you will need to share the sysConfig file as well as your application code.

    The below is some recommendations from R&D, as to what you should test/how you should test, when working with this driver:

    “Have they tried looking at the spectral content and comparing it vs what they sent? When trying to figure out why the audio content itself is noisy, I usually try to set up a pipeline as follows:

    1. Generate PCM frequency sweep in desired frequency range (50Hz to 8kHz or 16kHz depending on configuration)
    2. Turn PCM frequency sweep into PDM encoding
    3. Send PDM content to DUT via I2S from another DUT or feed PDM data straight into pdm2pcm assembly functions with the desired filter.
    4. Retrieve PCM content received from DUT (via driver or assembly code) and get it onto a PC
    5. Now you have to PCM files. The master file and the derivative one after being fed through the systems.
    6. Look at the frequency spectra of both sequences. The master file should have a flat line as spectrum since it is a pure sweep that we generated. The derivative file should be an approximation of that. “

     Siri

  • I don't know the reason, but it worked (no any noise) if I use GNU complier(v9.2.1) to buid my project, but has noise if I use TI Clang v2.1.2.LTS.

    maybe there is any wrong build configuration?  BTW, I'm using SimpleLink CC13xx CC26xx SDK - 7.10.00.98, my code is base on the empty project ( I just add the PDM drivr to catch data from D-MIC, and added UART driver to output the PCM Data).

  • Can you please check if the optimization is the same in the two cases?

    Also, look at the disassembly in the two cases and compare the generated assembly code.

    Siri

  • GNU use o3 level, and TI Clang has no optimization.

  • Are you able to continue your project using GNU? 

    If we shall figure out what the difference are between the GNU and the TI clang version, I need you to provide complete code for both so that we can compare the disassembly.

    Siri

  • Yes, I can continue my project using GNU complier now. and sorry, I can not share my code, let us close this issue.  many thanks~