AM2754-Q1: Based on AM275-AWE-SDK_11.00.00.17, adding MCASP2 does not allow TDM communication from AEC2 to external devices.

Part Number: AM2754-Q1
Other Parts Discussed in Thread: TAD5212, SYSCONFIG

Tool/software:

I made a change syscfg file to use MCASP2, but TDM communication waveform cannot be verified from AEC2 (Audio Expansion Connector)


I'm developing based on AM275-AWE-SDK_11.00.00.17.
It is known that this SDK realizes 8 channel input and output through MCASP1 by receiving TDM8 from two AD converters (PCM6240) and transmitting TDM8 to four DA converters (TAD5212).

What is the correct change to the syscfg file?

Is AEC tested?
If AEC2 is being tested, is the test environment shareable?

  • Hi Sugai-san,

    I will check internally if AEC2 has been tested with mcasp2 instance and then will get back to you.

    Regards,
    Ritapravo

  • Hi Sugai-san,

    Can you share some more details on your setup?

     - How are you interfacing the external device?

     - What signals is the external device providing to the mcasp instance?

     - How is clocking used in your setup? 

    Regards,
    Ritapravo

  • Hi Ritapravo-san,

    Thank you for your reply.

    I can extract the build config and syscfg file, so can you judge with that?

    I have an AEC connector, so I don't connect any devices, but wire through the connector and observe with an oscilloscope.
    I can't disclose the specific system configuration I'm developing, so I'm making specific inquiries through Mr. Ito Jun by private E2E.

    # top-level makefile include
    DEVICE=am275x
    PROFILE=release
    
    # -------------------------------------
    # AWE Tuning interface UART or ETHERNET
    # -------------------------------------
    TUNING = ETHERNET
    #TUNING = UART
    
    # --------------------------
    # DHCP or static IP Address
    # --------------------------
    DHCP = 0
    
    # ---------------------------------
    # Enable AVB PCM streaming 
    # Supports listener and talker mode
    #
    # Note : AVB_AUDIO = 1,
    #        ASDK_BLOCK_SIZE => 64 or 16
    #
    # ---------------------------------
    AVB_AUDIO = 0
    AVB_REMOTE = 0
    
    # ---------------------------------
    # Enable Multi-Instance Build
    # ---------------------------------
    BUILD_AWE_MULTI = 1
    
    # -------------------------------------------------
    # Enable Opti-flash
    #  - to support AVAS usecases
    # -------------------------------------------------
    OPTI_FLASH_SUPPORT = 1
    
    # -------------------------------------------------
    # Set Fundamental Block-Size : Number of samples
    #     per audio block, handled by the real-time
    #     audio I/O functions
    #   - This sets DMA transfer interrupt rate
    #   - Audio layout in designer should
    #     be integer multiples of Block Size
    #
    # Note : AVB_AUDIO = 1
    #        ASDK_BLOCK_SIZE => 64 or 16
    #
    # -------------------------------------------------
    export ASDK_BLOCK_SIZE = 16
    
    # --------------------------------------------------
    # Regression Test requires more memory for streaming
    #    use-cases, so memory must be configured
    # -------------------------------------------------
    REGRESSION_TEST = 0
    
    CWD := $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
    
    # AWE Code Path
    export AWE8_CORE_C7_PATH?=$(abspath ${CWD}/../../packages/dspc/c7x/${DEVICE}/AWECore)
    
    # MCU PLUS SDK Path
    export MCU_PLUS_SDK_PATH:=$(abspath ${CWD}/../../mcu_plus_sdk/${DEVICE})
    
    export MATHLIB_PATH:=$(abspath ${MCU_PLUS_SDK_PATH}/source/mathlib)
    export DSPLIB_C7_PATH:=$(abspath ${MCU_PLUS_SDK_PATH}/source/dsplib)
    export FFTLIB_PATH:=$(abspath ${MCU_PLUS_SDK_PATH}/source/fftlib)
    
    
    
    /**
     * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
     * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
     * @cliArgs --device "AM275x" --part "AM2754" --package "ANJ" --context "c75ss0-0" --product "AM275x_FREERTOS_SDK@11.00.00"
     * @v2CliArgs --device "AM2754" --package "FCCSP (ANJ)" --context "c75ss0-0" --product "AM275x_FREERTOS_SDK@11.00.00"
     * @versions {"tool":"1.23.0+4000"}
     */
    
    /**
     * Import the modules used in this configuration.
     */
    const flash       = scripting.addModule("/board/flash/flash", {}, false);
    const flash1      = flash.addInstance();
    const ipc         = scripting.addModule("/drivers/ipc/ipc");
    const mcasp       = scripting.addModule("/drivers/mcasp/mcasp", {}, false);
    const mcasp1      = mcasp.addInstance();
    const mcasp2      = mcasp.addInstance();
    const clock       = scripting.addModule("/kernel/dpl/clock");
    const debug_log   = scripting.addModule("/kernel/dpl/debug_log");
    const mmu_armv8   = scripting.addModule("/kernel/dpl/mmu_armv8", {}, false);
    const mmu_armv81  = mmu_armv8.addInstance();
    const mmu_armv82  = mmu_armv8.addInstance();
    const mmu_armv83  = mmu_armv8.addInstance();
    const mmu_armv84  = mmu_armv8.addInstance();
    const mmu_armv85  = mmu_armv8.addInstance();
    const mmu_armv86  = mmu_armv8.addInstance();
    const mmu_armv87  = mmu_armv8.addInstance();
    const mmu_armv88  = mmu_armv8.addInstance();
    const mmu_armv89  = mmu_armv8.addInstance();
    const mmu_armv810 = mmu_armv8.addInstance();
    const mmu_armv811 = mmu_armv8.addInstance();
    const mmu_armv812 = mmu_armv8.addInstance();
    const mmu_armv813 = mmu_armv8.addInstance();
    
    /**
     * Write custom configuration values to the imported modules.
     */
    flash1.$name                                           = "CONFIG_FLASH0";
    flash1.serialFlashDriver.$name                         = "board_flash_serialFlash_serialflash0";
    flash1.serialFlashDriver.peripheralDriver.$name        = "CONFIG_OSPI0";
    flash1.serialFlashDriver.peripheralDriver.phyEnable    = true;
    flash1.serialFlashDriver.peripheralDriver.OSPI.$assign = "OSPI0";
    
    ipc.wkup_r5fss0_0 = "NONE";
    ipc.r5fss0_0      = "NONE";
    ipc.r5fss0_1      = "notify";
    ipc.r5fss1_0      = "NONE";
    ipc.r5fss1_1      = "NONE";
    ipc.c75ss1_0      = "notify";
    
    mcasp1.$name                                            = "CONFIG_MCASP_EVM";
    mcasp1.txDataMask                                       = 0xFFFFFFFF;
    mcasp1.rxDataMask                                       = 0xFFFFFFFF;
    mcasp1.enableLoopback                                   = false;
    mcasp1.skipDriverOpen                                   = true;
    mcasp1.clkSyncMode                                      = "ASYNC";
    mcasp1.txCallbackFxn                                    = "mcasp_txCallback";
    mcasp1.rxCallbackFxn                                    = "mcasp_rxCallback";
    mcasp1.TxMode                                           = "TDM";
    mcasp1.NumTxSlots                                       = 16;
    mcasp1.txFsWidth                                        = 0;
    mcasp1.txFsPolarity                                     = 0;
    mcasp1.RxMode                                           = "TDM";
    mcasp1.NumRxSlots                                       = 8;
    mcasp1.rxFsWidth                                        = 0;
    mcasp1.rxActiveSlotMask                                 = 0xFF;
    mcasp1.txActiveSlotMask                                 = 0xFF;
    mcasp1.txHclkSource                                     = 0;
    mcasp1.txHclkSourceMux                                  = 4;
    mcasp1.rxHclkSource                                     = 0;
    mcasp1.rxHclkSourceMux                                  = 4;
    mcasp1.rxFsPolarity                                     = 0;
    mcasp1.rxLoopjobBufLength                               = 512;
    mcasp1.txLoopjobBufExtern                               = "uint8_t gMcaspAudioBufferTx[][]";
    mcasp1.txLoopjobBufLength                               = 2048;
    mcasp1.txBitClkPolarity                                 = 0;
    mcasp1.MCASP.$assignAllowConflicts                      = "MCASP1";
    mcasp1.mcaspSer.create(2);
    mcasp1.mcaspSer[0].$name                                = "CONFIG_MCASP_SER1";
    mcasp1.mcaspSer[0].dataDir                              = "Receive";
    mcasp1.mcaspSer[0].MCASP.$assignAllowConflicts          = "MCASP1";
    mcasp1.mcaspSer[0].MCASP.AXR0.$assignAllowConflicts     = "MCASP1_AXR0";
    mcasp1.mcaspSer[1].$name                                = "CONFIG_MCASP_SER0";
    mcasp1.mcaspSer[1].serNum                               = 1;
    mcasp1.mcaspSer[1].MCASP.$assignAllowConflicts          = "MCASP1";
    mcasp1.CLOCKING.$assignAllowConflicts                   = "CLOCKING";
    mcasp1.CLOCKING.AUDIO_EXT_REFCLK2.$assignAllowConflicts = "GPIO1_72";
    scripting.suppress("Resource conflict,MCASP1 is also in use by @@@.+?@@@, @@@.+?@@@", mcasp1.MCASP, "$assign");
    scripting.suppress("Resource conflict,MCASP1 is also in use by @@@.+?@@@, @@@.+?@@@", mcasp1.mcaspSer[0].MCASP, "$assign");
    scripting.suppress("Resource conflict,MCASP1 is also in use by @@@.+?@@@, @@@.+?@@@", mcasp1.mcaspSer[1].MCASP, "$assign");
    scripting.suppress("Resource conflict,CLOCKING is also in use by @@@.+?@@@", mcasp1.CLOCKING, "$assign");
    scripting.suppress("Resource conflict,@@@.+?@@@ is also in use by @@@.+?@@@", mcasp1.CLOCKING, "AUDIO_EXT_REFCLK2");
    
    mcasp2.$name                                            = "CONFIG_MCASP_A2B";
    mcasp2.enableLoopback                                   = false;
    mcasp2.skipDriverOpen                                   = true;
    mcasp2.clkSyncMode                                      = "ASYNC";
    mcasp2.TxMode                                           = "TDM";
    mcasp2.NumTxSlots                                       = 16;
    mcasp2.txBitClkPolarity                                 = 0;
    mcasp2.txDataMask                                       = 0xFFFFFFFF;
    mcasp2.txActiveSlotMask                                 = 0xFF;
    mcasp2.txCallbackFxn                                    = "mcasp_txCallback";
    mcasp2.enableMcaspRx                                    = false;
    mcasp2.txLoopjobBufLength                               = 2048;
    mcasp2.txHclkSource                                     = 0;
    mcasp2.txHclkSourceMux                                  = 4;
    mcasp2.txLoopjobBuf                                     = "gTxLoopjobBuf1";
    mcasp2.txFsWidth                                        = 0;
    mcasp2.txFsPolarity                                     = 0;
    mcasp2.mcaspSer.create(1);
    mcasp2.mcaspSer[0].$name                                = "CONFIG_MCASP_SER2";
    mcasp2.mcaspSer[0].MCASP.$assignAllowConflicts          = "MCASP2";
    mcasp2.mcaspSer[0].MCASP.AXR0.$assign                   = "MCASP2_AXR0";
    mcasp2.MCASP.$assignAllowConflicts                      = "MCASP2";
    mcasp2.MCASP.AFSX.$assign                               = "MCASP2_AFSX";
    mcasp2.MCASP.ACLKX.$assign                              = "MCASP2_ACLKX";
    mcasp2.CLOCKING.$assignAllowConflicts                   = "CLOCKING";
    mcasp2.CLOCKING.AUDIO_EXT_REFCLK2.$assignAllowConflicts = "GPIO1_72";
    scripting.suppress("Resource conflict,MCASP2 is also in use by @@@.+?@@@", mcasp2.mcaspSer[0].MCASP, "$assign");
    scripting.suppress("Resource conflict,MCASP2 is also in use by @@@.+?@@@", mcasp2.MCASP, "$assign");
    scripting.suppress("Resource conflict,CLOCKING is also in use by @@@.+?@@@", mcasp2.CLOCKING, "$assign");
    scripting.suppress("Resource conflict,@@@.+?@@@ is also in use by @@@.+?@@@", mcasp2.CLOCKING, "AUDIO_EXT_REFCLK2");
    
    const udma         = scripting.addModule("/drivers/udma/udma", {}, false);
    const udma1        = udma.addInstance({}, false);
    udma1.$name        = "CONFIG_UDMA0";
    mcasp1.bcDmaDriver = udma1;
    mcasp2.bcDmaDriver = udma1;
    
    debug_log.enableCssLog       = false;
    debug_log.enableSharedMemLog = true;
    
    mmu_armv81.size  = 0x20000000;
    mmu_armv81.$name = "REGISTER_REGION_0";
    
    mmu_armv82.vAddr = 0x20000000;
    mmu_armv82.pAddr = 0x20000000;
    mmu_armv82.size  = 0x20000000;
    mmu_armv82.$name = "REGISTER_REGION_1";
    
    mmu_armv83.vAddr = 0x40000000;
    mmu_armv83.pAddr = 0x40000000;
    mmu_armv83.size  = 0x20000000;
    mmu_armv83.$name = "REGISTER_REGION_2";
    
    mmu_armv84.vAddr = 0x7C200000;
    mmu_armv84.pAddr = 0x7C200000;
    mmu_armv84.$name = "CLEC";
    mmu_armv84.size  = 0x100000;
    
    mmu_armv85.$name     = "L2RAM";
    mmu_armv85.vAddr     = 0x7E000000;
    mmu_armv85.pAddr     = 0x7E000000;
    mmu_armv85.size      = 0x200000;
    mmu_armv85.attribute = "MAIR7";
    
    mmu_armv86.$name     = "L2RAM_AUX";
    mmu_armv86.vAddr     = 0x7E200000;
    mmu_armv86.pAddr     = 0x7E200000;
    mmu_armv86.size      = 0x100000;
    mmu_armv86.attribute = "MAIR7";
    
    mmu_armv87.$name     = "MSRAM_REGION_0";
    mmu_armv87.vAddr     = 0x80000000;
    mmu_armv87.pAddr     = 0x80000000;
    mmu_armv87.size      = 0x200000;
    mmu_armv87.attribute = "MAIR7";
    
    mmu_armv88.$name     = "MSRAM_REGION_1";
    mmu_armv88.vAddr     = 0x80200000;
    mmu_armv88.pAddr     = 0x80200000;
    mmu_armv88.size      = 0x200000;
    mmu_armv88.attribute = "MAIR7";
    
    mmu_armv89.$name     = "MSRAM_REGION_2";
    mmu_armv89.vAddr     = 0x80400000;
    mmu_armv89.pAddr     = 0x80400000;
    mmu_armv89.size      = 0x200000;
    mmu_armv89.attribute = "MAIR7";
    
    mmu_armv810.$name = "DRU";
    mmu_armv810.vAddr = 0x7C400000;
    mmu_armv810.pAddr = 0x7C400000;
    mmu_armv810.size  = 0x300000;
    
    mmu_armv811.$name       = "MCASP";
    mmu_armv811.vAddr       = 0x2B10000;
    mmu_armv811.pAddr       = 0x2B10000;
    mmu_armv811.size        = 0x2000000;
    mmu_armv811.privExecute = false;
    
    mmu_armv812.vAddr = 0x60000000;
    mmu_armv812.pAddr = 0x60000000;
    mmu_armv812.size  = 0x10000000;
    mmu_armv812.$name = "FLASH";
    
    mmu_armv813.$name     = "MSRAM_REGION_3";
    mmu_armv813.vAddr     = 0x80580000;
    mmu_armv813.pAddr     = 0x80580000;
    mmu_armv813.size      = 0x200000;
    mmu_armv813.attribute = "MAIR4";
    
    /**
     * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
     * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
     * re-solve from scratch.
     */
    flash1.serialFlashDriver.peripheralDriver.OSPI.CLK.$suggestSolution  = "OSPI0_CLK";
    flash1.serialFlashDriver.peripheralDriver.OSPI.CSn0.$suggestSolution = "OSPI0_CSn0";
    flash1.serialFlashDriver.peripheralDriver.OSPI.DQS.$suggestSolution  = "OSPI0_DQS";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D7.$suggestSolution   = "OSPI0_D7";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D6.$suggestSolution   = "OSPI0_D6";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D5.$suggestSolution   = "OSPI0_D5";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D4.$suggestSolution   = "OSPI0_D4";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D3.$suggestSolution   = "OSPI0_D3";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D2.$suggestSolution   = "OSPI0_D2";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D1.$suggestSolution   = "OSPI0_D1";
    flash1.serialFlashDriver.peripheralDriver.OSPI.D0.$suggestSolution   = "OSPI0_D0";
    mcasp1.MCASP.AFSX.$suggestSolution                                   = "MCASP1_AFSX";
    mcasp1.MCASP.ACLKX.$suggestSolution                                  = "MCASP1_ACLKX";
    mcasp1.MCASP.AFSR.$suggestSolution                                   = "MCASP0_AXR15";
    mcasp1.MCASP.ACLKR.$suggestSolution                                  = "MCASP0_AXR14";
    mcasp1.mcaspSer[0].MCASP.AXR0.$suggestSolution                       = "MCASP1_AXR0";
    mcasp1.mcaspSer[1].MCASP.AXR1.$suggestSolution                       = "MCASP1_AXR1";
    

  • Hi Sugai-san,

    Thank you for sending out the configuration details. I am looking into it and will get back to you in some time.

    Regards,
    Ritapravo

  • Hi Ritapravo,

    Customer is waiting for your feedback. Could you please update as possible as you can?

    Best regards,

    Ito

  • Hi Ito-san and Sugai-san,

    Apologies. I didn't get a chance to look at this one. I will surely look at this thread within the next 2 days and get back to you.

    Regards,
    Ritapravo

  • Hi Sugai-san,

    If AEC2 is being tested, is the test environment shareable?

    I modified the mcasp_multichannel_playback example and created the attached mcasp2_aec2_multichannel_playback_am275x-evm_c75ss0-0_freertos_ti-c7000.zip for testing mcasp2 using AEC2. Here, the MCASP2_AXR0 (27) is configured as input/receive and MCASP2_AXR1(29) is configured as output/transmit. I verified using a logic analyzer and I was able to get the desired output through MCASP2_AXR1. You can use CCS to load this program and test it. 

    Also, I went through the sysConfig file you sent earlier. You have checked the checkbox - "skip driver open".
    If you select this option, you will have to manually start the mcasp driver using the function MCASP_open(). Please check once if this function is being called in your code somewhere after the clocks are initialized. This can be a potential reason why no output is obtained from mcasp2 in AEC2. 

    Please let me know if you are able to proceed. 

    Regards,
    Ritapravo

  • Hi Sugai-san,

    If AEC2 is being tested, is the test environment shareable?

    I modified the mcasp_multichannel_playback example and created the attached 7450.mcasp2_aec2_multichannel_playback_am275x-evm_c75ss0-0_freertos_ti-c7000.zip for testing mcasp2 using AEC2. Here, the MCASP2_AXR0 (27) is configured as input/receive and MCASP2_AXR1(29) is configured as output/transmit. I verified using a logic analyzer and I was able to get the desired output through MCASP2_AXR1. You can use CCS to load this program and test it. 

    Also, I went through the sysConfig file you sent earlier. You have checked the checkbox - "skip driver open".
    If you select this option, you will have to manually start the mcasp driver using the function MCASP_open(). Please check once if this function is being called in your code somewhere after the clocks are initialized. This can be a potential reason why no output is obtained from mcasp2 in AEC2. 

    Please let me know if you are able to proceed. 

    Regards,
    Ritapravo

  • Hi Ritapravo-san,

    When I checked the operation of the provided software, BCLK and SYNC were out, but the DATA line was not signaling.

    Ch.1 Yellow signal is BCLK (MCASP2_ACLKX)
    Ch.2 Pink signal SYNC (MCASP2_AFSX)
    Ch.3 Green signal is SIO (MCASP2_AXR1)


    There doesn't seem to be any hardware configuration problems, so we went ahead with one confirmation.
    But my interest is in AM275-AWE-SDK.
    It is important that the desired system is built starting with SysConfig.

    The following problem solving will be more valuable to us.
    AUDIO-AM275-EVM: Couldn't output TDM communication wave form AEC1 with AM275-AWE-SDK_11.01.16.06 - Processors forum - Processors - TI E2E support forums

  • Hi Sugai-san,

    When I checked the operation of the provided software, BCLK and SYNC were out, but the DATA line was not signaling.

    Thank you for the observation. The data line was not signaling, because this is kind of a playback example. To get an output signal, you will have to input any signal in the  MCASP2_AXR0 (27th AEC2 pin), then you will be able to record output in MCASP2_AXR1(29th AEC2 pin). We no input is given, it will take it as 0.

    I just tested it. I am able to get the frame sync and transmit bit clock of MCASP0 through logic analyzer. In your testing, were you able to get the FSYNC and the Bit clock through logic analyzer? [ Make sure  AEC_TAS6754_SUPPORT = 1 and  AVB_AUDIO = 1 are set in asdk_am275_includes.mak ]

    Regards,
    Ritapravo