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.

PCMD3180: Need FreeRTOS version of the Driver code for PCMD3180

Part Number: PCMD3180

Tool/software:

I'm working on developing a PoC with PCMD3180 as MIC and LPC5516 as speaker.

I want to integrate the PCMD3180 driver with LPC5516.

If I can get startup code in FreeRTOS version to use PCMD3180 with LPC5516, then it would be of a great help.

I would also like to know the step-by-step procedure to use the driver.

  • Hi,

    The PCMD3180 has some Linux drivers available here: https://www.ti.com/tool/PCMD31XX-DRIVERS

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml

    You can follow the instructions in this forum post to change the adcx140 driver to work with PCMD3180: https://e2e.ti.com/support/audio-group/audio/f/audio-forum/954542/faq-pcmd3180-is-there-a-linux-driver-for-the-pcmd3180-devices

    I'm not sure about FreeRTOS, but hopefully the linux drivers will work there, and there is an example DTS config for the device at the end of the yaml file I linked here. Once you have the driver working and DTS configured, the ADC should show up in the audio chain of the MCU. For regular Linux distros, this would be in alsamixer or similar. If you do not think the Linux driver will work for FreeRTOS, I would recommend just sending it I2C commands. You can create a script using PPC3 (PurePath Console) for the device. If you need more help with this let me know.

    Best,
    Mir

  • Hi Mir,

    Thank you so much for the reply.
    I'm absolutely a new beginner to this type of technology.

    Could you please help me with what is the driver and how to work with it?

    If you have any reference videos or documents to get me started, please share with me regarding the same

  • Hi,

    Drivers are usually located on a path that your computer searches for, for compatibility with the registers of the device and how they would map to volume control or other parameters, for example. It would depend on the end device where the driver files need to be installed. Unless you need a lot of drivers for your end application, if you are a beginner I would recommend trying to communicate with the device over I2C first before you worry about drivers. Check the address 0x4c if MISO and SCLK are low. 

    I have never touched FreeRTOS, so if you do want to try using a driver with it, I would recommend reaching out on the FreeRTOS forums about it. It seems like FreeRTOS is not really Linux-like so I think there's a low chance of getting these Linux drivers implemented on your end device, but you can see what the FreeRTOS experts say. Let me know if you have any issues or need help with a more specific converter settings question.

    Best,
    Mir

  • Hi Mir,

    So, the linux driver code specified in the links you've shared are for using the driver code in the master device and the PCMD3180 will act as slave.
    Am I right Mir?

    Samson S.D.

  • Hi Samson,

    Yes, the driver code is for the master device (a Linux computer or MCU of some kind) to communicate over I2C and I2S with the codec to send audio between the two with ALSA. The codec is always the I2C slave or target of the MCU, with a driver or without. Since the drivers are not written for a non-Linux system, I believe you will have more success communicating with the device with configuring the I2C manually with register settings from your MCU, and then using the ASI on your LPC5516 to send clocks to the audio converter and receive the audio data out.

    Let me know if you need more help with I2C config settings for the converter, and please reach out to the NXP forum (https://community.nxp.com/t5/LPC-Microcontrollers/bd-p/lpc) if you need help configuring the MCU for audio as this is not a TI part.

    Best,
    Mir