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.

DRA76P: no data output on McASP

Part Number: DRA76P

Hello,

I'm trying to transmit I2S data through McASP1 AXR5 from IPU1 core on our custom board, below is the environment we're using:

bios_6_46_04_53

edma3_lld_02_12_00_20

pdk_01_10_00_08(I copied the mcasp driver code from bsp-01.02.03.04 since there is no mcasp driver code in pdk_01_10_00_08)

The ACLKX, AFSX and ACHLKX output as expected, but there is not any data output on AXR5. The register dump of McASP1: 

omapconf dump 0x48460000 0x484602BC
Warning: chip not recognized, running in safe mode (only platform-generic functions allowed).

|----------------------------|
| Address (hex) | Data (hex) |
|----------------------------|
| 0x48460000    | 0x44307B03 |
| 0x48460004    | 0x00000001 |
| 0x48460008    | 0x00000000 |
| 0x4846000C    | 0x00000000 |
| 0x48460010    | 0x00000000 |
| 0x48460014    | 0x14000020 |
| 0x48460018    | 0x00000000 |
| 0x4846001C    | 0x08000000 |
| 0x48460020    | 0x00000000 |
| 0x48460024    | 0x00000000 |
| 0x48460028    | 0x00000000 |
| 0x4846002C    | 0x00000000 |
| 0x48460030    | 0x0000C291 |
| 0x48460034    | 0x00000000 |
| 0x48460038    | 0x00000001 |
| 0x4846003C    | 0x00000000 |
| 0x48460040    | 0x00000000 |
| 0x48460044    | 0x00001F00 |
| 0x48460048    | 0x00000000 |
| 0x4846004C    | 0x00000000 |
| 0x48460050    | 0x00000000 |
| 0x48460054    | 0x00000000 |
| 0x48460058    | 0x00000000 |
| 0x4846005C    | 0x00000000 |
| 0x48460060    | 0x00001F00 |
| 0x48460064    | 0xFFFFFFFF |
| 0x48460068    | 0x00000000 |
| 0x4846006C    | 0x00000000 |
| 0x48460070    | 0x00180003 |
| 0x48460074    | 0x00188046 |
| 0x48460078    | 0x00000001 |
| 0x4846007C    | 0x00000000 |
| 0x48460080    | 0x00000104 |
| 0x48460084    | 0x00000000 |
| 0x48460088    | 0x00000000 |
| 0x4846008C    | 0x00000000 |
| 0x48460090    | 0x00000000 |
| 0x48460094    | 0x00000000 |
| 0x48460098    | 0x00000000 |
| 0x4846009C    | 0x00000000 |
| 0x484600A0    | 0x00001F00 |
| 0x484600A4    | 0xFFFFFFFF |
| 0x484600A8    | 0x000080F4 |
| 0x484600AC    | 0x00000112 |
| 0x484600B0    | 0x000000A3 |
| 0x484600B4    | 0x00000000 |
| 0x484600B8    | 0x00000003 |
| 0x484600BC    | 0x00000003 |
| 0x484600C0    | 0x00000154 |
| 0x484600C4    | 0x00000000 |
| 0x484600C8    | 0xB4000000 |
| 0x484600CC    | 0x00000000 |
| 0x484600D0    | 0x00000000 |
| 0x484600D4    | 0x00000000 |
| 0x484600D8    | 0x00000000 |
| 0x484600DC    | 0x00000000 |
| 0x484600E0    | 0x00000000 |
| 0x484600E4    | 0x00000000 |
| 0x484600E8    | 0x00000000 |
| 0x484600EC    | 0x00000000 |
| 0x484600F0    | 0x00000000 |
| 0x484600F4    | 0x00000000 |
| 0x484600F8    | 0x00000000 |
| 0x484600FC    | 0x00000000 |
| 0x48460100    | 0x00000000 |
| 0x48460104    | 0x00000000 |
| 0x48460108    | 0x00000000 |
| 0x4846010C    | 0x00000000 |
| 0x48460110    | 0x00000000 |
| 0x48460114    | 0x00000000 |
| 0x48460118    | 0x00000000 |
| 0x4846011C    | 0x00000000 |
| 0x48460120    | 0x00000000 |
| 0x48460124    | 0x00000000 |
| 0x48460128    | 0x00000000 |
| 0x4846012C    | 0x00000000 |
| 0x48460130    | 0x00000000 |
| 0x48460134    | 0x00000000 |
| 0x48460138    | 0x00000000 |
| 0x4846013C    | 0x00000000 |
| 0x48460140    | 0x00000000 |
| 0x48460144    | 0x00000000 |
| 0x48460148    | 0x00000000 |
| 0x4846014C    | 0x00000000 |
| 0x48460150    | 0x00000000 |
| 0x48460154    | 0x00000000 |
| 0x48460158    | 0x00000000 |
| 0x4846015C    | 0x00000000 |
| 0x48460160    | 0x00000000 |
| 0x48460164    | 0x00000000 |
| 0x48460168    | 0x00000000 |
| 0x4846016C    | 0x00000000 |
| 0x48460170    | 0x00000000 |
| 0x48460174    | 0x00000000 |
| 0x48460178    | 0x00000000 |
| 0x4846017C    | 0x00000000 |
| 0x48460180    | 0x00000000 |
| 0x48460184    | 0x00000000 |
| 0x48460188    | 0x00000000 |
| 0x4846018C    | 0x00000000 |
| 0x48460190    | 0x00000000 |
| 0x48460194    | 0x00000001 |
| 0x48460198    | 0x00000000 |
| 0x4846019C    | 0x00000000 |
| 0x484601A0    | 0x00000000 |
| 0x484601A4    | 0x00000000 |
| 0x484601A8    | 0x00000000 |
| 0x484601AC    | 0x00000000 |
| 0x484601B0    | 0x00000000 |
| 0x484601B4    | 0x00000000 |
| 0x484601B8    | 0x00000000 |
| 0x484601BC    | 0x00000000 |
| 0x484601C0    | 0x00000000 |
| 0x484601C4    | 0x00000000 |
| 0x484601C8    | 0x00000000 |
| 0x484601CC    | 0x00000000 |
| 0x484601D0    | 0x00000000 |
| 0x484601D4    | 0x00000000 |
| 0x484601D8    | 0x00000000 |
| 0x484601DC    | 0x00000000 |
| 0x484601E0    | 0x00000000 |
| 0x484601E4    | 0x00000000 |
| 0x484601E8    | 0x00000000 |
| 0x484601EC    | 0x00000000 |
| 0x484601F0    | 0x00000000 |
| 0x484601F4    | 0x00000000 |
| 0x484601F8    | 0x00000000 |
| 0x484601FC    | 0x00000000 |
| 0x48460200    | 0x00000000 |
| 0x48460204    | 0x00000000 |
| 0x48460208    | 0x00000000 |
| 0x4846020C    | 0x00000000 |
| 0x48460210    | 0x00000000 |
| 0x48460214    | 0x00000000 |
| 0x48460218    | 0x00000000 |
| 0x4846021C    | 0x00000000 |
| 0x48460220    | 0x00000000 |
| 0x48460224    | 0x00000000 |
| 0x48460228    | 0x00000000 |
| 0x4846022C    | 0x00000000 |
| 0x48460230    | 0x00000000 |
| 0x48460234    | 0x00000000 |
| 0x48460238    | 0x00000000 |
| 0x4846023C    | 0x00000000 |
| 0x48460240    | 0x00000000 |
| 0x48460244    | 0x00000000 |
| 0x48460248    | 0x00000000 |
| 0x4846024C    | 0x00000000 |
| 0x48460250    | 0x00000000 |
| 0x48460254    | 0x00000000 |
| 0x48460258    | 0x00000000 |
| 0x4846025C    | 0x00000000 |
| 0x48460260    | 0x00000000 |
| 0x48460264    | 0x00000000 |
| 0x48460268    | 0x00000000 |
| 0x4846026C    | 0x00000000 |
| 0x48460270    | 0x00000000 |
| 0x48460274    | 0x00000000 |
| 0x48460278    | 0x00000000 |
| 0x4846027C    | 0x00000000 |
| 0x48460280    | 0x00000000 |
| 0x48460284    | 0x00000000 |
| 0x48460288    | 0x00000000 |
| 0x4846028C    | 0x00000000 |
| 0x48460290    | 0x00000000 |
| 0x48460294    | 0x00000000 |
| 0x48460298    | 0x00000000 |
| 0x4846029C    | 0x00000000 |
| 0x484602A0    | 0x00000000 |
| 0x484602A4    | 0x00000000 |
| 0x484602A8    | 0x00000000 |
| 0x484602AC    | 0x00000000 |
| 0x484602B0    | 0x00000000 |
| 0x484602B4    | 0x00000000 |
| 0x484602B8    | 0x00000000 |
| 0x484602BC    | 0x00000000 |
|----------------------------|

The EDMA3 seems work properly too: 

[0][      0.467] [Mcasp1_init][335]: -----> GIO_issue @9e2af5dc 16384 bytes
[0][      0.467] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][129].paRAMId 129, srcAddr @9e2af5dc, destAddr @45800000, aCnt 4, bCnt 32, cCnt 128, linkAddr @00005040
[0][      0.468] [Mcasp1_init][347]: -----> GIO_issue @9e2b35dc 16384 bytes
[0][      0.468] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][130].paRAMId 130, srcAddr @9e2b35dc, destAddr @45800000, aCnt 4, bCnt 32, cCnt 128, linkAddr @00005020
[0][      0.511] [edma3ComplHandler][5340]: IPR 0x00000000, IPRH 0x08000000
[0][      0.511] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][129].paRAMId 129, srcAddr @9e2e9e80, destAddr @45800000, aCnt 4, bCnt 32, cCnt 1, linkAddr @00005020
[0][      0.511] [Mcasp1_init][347]: -----> GIO_issue @9e2b75dc 16384 bytes
[0][      0.511] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][129].paRAMId 129, srcAddr @9e2b75dc, destAddr @45800000, aCnt 4, bCnt 32, cCnt 128, linkAddr @00005040
[0][      0.553] [edma3ComplHandler][5340]: IPR 0x00000000, IPRH 0x08000000
[0][      0.553] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][130].paRAMId 130, srcAddr @9e2e9e80, destAddr @45800000, aCnt 4, bCnt 32, cCnt 1, linkAddr @00005040
[0][      0.554] [Mcasp1_init][347]: -----> GIO_issue @9e2bb5dc 16384 bytes
[0][      0.554] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][130].paRAMId 130, srcAddr @9e2bb5dc, destAddr @45800000, aCnt 4, bCnt 32, cCnt 128, linkAddr @00005020
[0][      0.596] [edma3ComplHandler][5340]: IPR 0x00000000, IPRH 0x08000000
[0][      0.596] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][129].paRAMId 129, srcAddr @9e2e9e80, destAddr @45800000, aCnt 4, bCnt 32, cCnt 1, linkAddr @00005020
[0][      0.597] [Mcasp1_init][347]: -----> GIO_issue @9e2bf5dc 16384 bytes
[0][      0.597] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][129].paRAMId 129, srcAddr @9e2bf5dc, destAddr @45800000, aCnt 4, bCnt 32, cCnt 128, linkAddr @00005040
[0][      0.639] [edma3ComplHandler][5340]: IPR 0x00000000, IPRH 0x08000000
[0][      0.639] [EDMA3_DRV_setPaRAM][721]: edma3DrvChBoundRes[0][130].paRAMId 130, srcAddr @9e2e9e80, destAddr @45800000, aCnt 4, bCnt 32, cCnt 1, linkAddr @00005040
[0][      0.681] [edma3ComplHandler][5340]: IPR 0x00000000, IPRH 0x08000000

Do I miss something? Can anyone provide some tips on how to investigate this issue?

  • Hi Woj,

    Where did you obtain this PDK from?  The SDK which supports PDK McASP is http://software-dl.ti.com/infotainment/esd/jacinto6/processor-sdk-rtos-automotive/latest/index_FDS.html.  I would suggest you use this as we have not supported copy/paste of BSP code into PDK.  The SDK does not support DRA76P SOC/EVM directly, but the driver and integration details are the same as on other DRA7xx devices for reference.

    You may be close with your setup.  Is padconfig set up properly to output mcasp1_axr5 signal?

    Thanks,
    Stephen

  • Hello Stephen,

    The IPU1 image was build from the vision sdk. As you may know, the pdk of the vision sdk environment doesn't support mcasp. So I copied the macap driver code from bsp-01.02.03.04, which has been verified in another program on the same board.

    And the padconfig of the mcasp1_axr5 has been set properly too according to the value of the register CTRL_CORE_PAD_MCASP1_AXR5:

    omapconf read 0x4A0036C8

    00040000

    Are there any other points need to be checked? I mean I'm not sure whether this issue is caused by McASP itself or by EDMA3.

    Thanks,

    Woj

  • Hi Woj,

    I need to get more information before I can understand what the problem may be.

    Woj said:
    I copied the macap driver code from bsp-01.02.03.04, which has been verified in another program on the same board

    What program did you use to verify this?  The log showing buffer submission for EDMA copy in your new program seem odd for I2S configuration.  Are there differences between McASP/EDMA configurations and program flow between the working and non-working applications?  

    Also, I see you are using omapconf tool - which OS are you running on A15?

    Thanks,
    Stephen

  • Hello Stephen,

    Stephen Molfetta said:
    What program did you use to verify this?

    It was verified on APPE SDK(vis_01.50.23.01) which runs on the DSP core.

    Stephen Molfetta said:
    The log showing buffer submission for EDMA copy in your new program seem odd for I2S configuration.

    Don't understand of this question.

    Stephen Molfetta said:
    Are there differences between McASP/EDMA configurations and program flow between the working and non-working applications?

    The configuration of McASP is copied from the APPE program, as a comparison, the dumped values of the McASP registers when running APPE program is listed here(both transmit and receive are enabled on APPE program): /cfs-file/__key/communityserver-discussions-components-files/791/mcasp_2D00_dsp1.txt

    Regarding the configuration of the EDMA, only the DMA request channel is change from 1 to 59, since the lower channels are assigned to A15 in the vision SDK. 

    And the program flow of my new program is a simple version copy of the APPE program, generally described as below:

    1. Call GIO_issue() twice before the first DMA interrupt coming, then wait for the next interrupt in the main loop.

    2. Call GIO_reclaim() in the callback function called by the DMA ISR, and send a message to the main loop.

    3. The main loop will call GIO_issue() to issue the next data package and wait again.

    The log of the APPE is listed here: /cfs-file/__key/communityserver-discussions-components-files/791/mcasp_2D00_dsp1_2D00_log.txt

    Stephen Molfetta said:
    Also, I see you are using omapconf tool - which OS are you running on A15?

    The OS running on A15 is Android O which is build from 6AO.1.1 SDK.

  • Hi Woj,

    Thanks for providing the details.  It is helpful to know your working reference is APPE:

    Woj said:
    Stephen Molfetta
    The log showing buffer submission for EDMA copy in your new program seem odd for I2S configuration.

    Don't understand of this question.

    I was looking at the BCNT/CCNT you have in your EDMA PaRAM.  Normally for I2S, BCNT is 2.  However, The BSP which is provided with APPE is a patched version with a hack to use the maximum size of McASP FIFO possible.  With that, it is more reasonable now that your BCNT is 32.  I would like to confirm whether the BSP code you copied into your PDK was taken from the 01.02.03.04_patched installer or if you obtained the BSP through another means?

    Note that for APPE, GIO_reclaim can be called from the ISR context only because a SyncGeneric is specified as the synchronization mechanism when passing GIO_params into GIO_create.  This is a basic sync interface which doesn't actually use any OS semaphore or synchronization method and just unconditionally returns.  By default, GIO_params sync method will use SYS/BIOS Sempahore interface.  Did you make this similar change in your application?

    APPE data flow is relatively complex, so it would also be helpful to understand the required data flow for your application.  There is a much simpler flow in the bsp_examples_audio_loopback example application provided by the BSP.  This can run both C66x_1 and IPU1 and can be used to as another reference for your implementation. Please confirm whether a similar type of program flow would be a better starting point for you?

    Thanks,
    Stephen

  • Hello Stephen,

    Stephen Molfetta said:
    I would like to confirm whether the BSP code you copied into your PDK was taken from the 01.02.03.04_patched installer or if you obtained the BSP through another means?

    Yes, the McASP code is copied from bsp-01.02.03.04 witch is installed by bsp_setuplinux_01.02.03.04_patched.bin. Is the value 32 of BCNT being a problem, and should I change to another McASP code?

    Stephen Molfetta said:
    Did you make this similar change in your application?

    Yes, I created the sync as APPE did.

    SyncGeneric_Params_init(&syncParam);
    syncParam.userSignal = (SyncGeneric_SignalFunc)mcaspCallBack;
    syncParam.signalArg = (UArg)&gioHandle;
    syncGen = SyncGeneric_create(&syncParam, &eb);
    ioParams.sync = SyncGeneric_Handle_upCast(syncGen);

    And GIO_reclaim() is called inside the mcaspCallBack().

    Stephen Molfetta said:
    Please confirm whether a similar type of program flow would be a better starting point for you?

    My purpose is really simple, just need to implement the play/stop sound feature through the McASP with a small latency. I would like to try the flow in the bsp_examples_audio_loopback example as you suggested.

  • Hello Stephen,

    I ported the bsp_examples_audio_loopback example into my project, unfortunately there was still not any data on axr5 pin.

    My project is base on the vision sdk, the code is: /cfs-file/__key/communityserver-discussions-components-files/791/board_5F00_tda2xx_5F00_ipu1_5F00_0.c log: /cfs-file/__key/communityserver-discussions-components-files/791/mcasp1_2D00_ipu1.txt regist: /cfs-file/__key/communityserver-discussions-components-files/791/mcasp1_2D00_ipu1_2D00_reg.txt

    All the work is included in the code except the edma initialization, which you can find the source code in vision_sdk\links_fw\src\rtos\utils_common\src\dma_cfg\utils_dma_edma3cc.c EDMA3_DRV_Result Utils_edma3Init(UInt32 edma3Id).

    Can you please spend some time to examine my code?

  • Hi Woj,

    What is your expected data format for your board?  You mention I2S in your original post, but the McASP configuration is not I2S.  I see the following:

    • 32-bit slot size,16-bit word size, right-justified data
    • 0 bit delay from the frame sync
    • Rising edge of frame sync starts frame

    Regardless, I would think your setup should be valid since you have rotation active, so can still get data out the pin as an effective 32-bit word.

    I'm not seeing any issues with the code after looking at it for a while.  Did you say you validated APPE on your board?  Do you have a TI EVM where you can run the BSP audio example?  I'm trying to understand what else may be different to see why you don't have data on your board/serializer.

    Thanks,
    Stephen

  • Hello Stephen,

    Sorry for late reply.

    Stephen Molfetta said:

    What is your expected data format for your board?  You mention I2S in your original post, but the McASP configuration is not I2S.  I see the following:

    • 32-bit slot size,16-bit word size, right-justified data
    • 0 bit delay from the frame sync
    • Rising edge of frame sync starts frame

    Yes, that's the expected output data format.

    Stephen Molfetta said:
    Regardless, I would think your setup should be valid since you have rotation active, so can still get data out the pin as an effective 32-bit word.

    I changed all the sample data to value 0xFFFFFFFF, still not any data. However, when I changed the mask value, 0xFFFF0F0F for example, and set the XPAD to 0b1, then there was non-zero data output. So I think the McASP works fine, I guess the cause is the sample data provided by the EDMA, but I didn't find any proof.

    Stephen Molfetta said:
    I'm not seeing any issues with the code after looking at it for a while.  Did you say you validated APPE on your board?  Do you have a TI EVM where you can run the BSP audio example?  I'm trying to understand what else may be different to see why you don't have data on your board/serializer.

    Yes, I have validated the APPE on my custom board, not a TI EVM. And the new project, which is build base on the vision sdk, runs on the same custom board too.

  • Woj said:
    I changed all the sample data to value 0xFFFFFFFF, still not any data. However, when I changed the mask value, 0xFFFF0F0F for example, and set the XPAD to 0b1, then there was non-zero data output. So I think the McASP works fine, I guess the cause is the sample data provided by the EDMA, but I didn't find any proof.

    According to this test, it seems that the McASP works fine, and the DATA port of the McASP is feed by the EDMA properly too. Now I'm wondering whether the EDMA got the correct source data.

    The soure data buffer is allocated as shown below:

    iheap = HeapMem_Handle_to_xdc_runtime_IHeap(myHeap);
    Error_init(&eb);
    txBuf[count] = Memory_calloc(iheap, BUFSIZE, BUFALIGN, &eb);

    and myHeap is confiured in Ipu1_0.cfg like this:

    var HeapParam = new HeapMem.Params;
    HeapParam.size = 200000;
    Program.global.myHeap = HeapMem.create(HeapParam);

    Please confirm whether this method used for allocating data buffer is correct or not.

    In chapter 22.1 of the TRM, it says that "MMU1 dedicated to EDMA Transfer Controller 0 (TC0), and EDMA Transfer Controller 1 (TC1)", as per my understanding, the EDMA is shared between multi remote cores(IPU1, IPU2, DSP1 and DSP2), then there must have one unified translation tables setting of the MMU1. Where does the MMU1 be configured? The environment is 6AO.1.1 + vision SDK, IPU2 is configured as the primary core in vision SDK, and my code runs on IPU1 wich is configured as the secondary core.

  • I have found the root cause.

    Woj said:
    According to this test, it seems that the McASP works fine, and the DATA port of the McASP is feed by the EDMA properly too. Now I'm wondering whether the EDMA got the correct source data.

    As what I wondered in my last reply, the EDMA didn't get the correct sample data. The system MMU1 wasn't enabled for EDMA TC0/TC1 RD/WR traffic according to the value of register CTRL_CORE_SMA_SW_7, which is 0x00000000, so the EDMA will directly use the virtual address to read the physical address without virtual to physical translation. Unfortunately, the virtual address scope is not the same as the physical address scope in my project, this means that the EDMA will read the sample data at an unexpected physical address. Everhthing goes OK when I changed the virtual address scope to be the same as the physicall address scope.

  • Hi Woj,

    Sorry for delayed reply over the US holidays.

    I'm glad that you were able to root cause the issue to addressing of the data buffer and confirm that the configuration is okay from the McASP side.  Regarding MMU1 setup, I'm not familiar with who may be responsible for this in the 6AO.1.1 + Vision SDK concurrency.  Please let me know if you need any further assistance on this or if you are able to proceed with your latest update.

    Thanks,
    Stephen

  • Hello Stephen,

    Thanks for your help, no further assistance is needed on this issue.

    Regarding the MMU1 setup, I'll create a new thread if necessary.