Hello,
I am working on the evm am5728 board. I would like to configure and service the MCASP2 bus interrupt on the DSP processor. I started with an IPC example and tried to integrated the example code for MCASP loopabck from the PDK packages. I made a few changes:
1) I made a new function McASP2_Enable() and changed all reference to the correct MCASP2 bus
2) I changed the EDMA from 0 to 1;
3) I changed the parameter when calling mcaspBindDev() to configure MCASP2 instead.
Now the code is blocked in the mcaspCreateChan() function. I am guessing the problem is the results of the conflict when setting up the MCASP channel.
Here is my configuration:
Linux:
- Linux kernel: am57xx-evm 4.4.19-rt25-gf572d285f0 #50 SMP PREEMPT RT Mon Nov 28 11:52:02 EST 2016 armv7l GNU/Linux
- mcasp2 configured and enabled in the dts.
--------------------
&mcasp2 {
#sound-dai-cells = <0>;
assigned-clocks = <&mcasp2_ahclkx_mux>;
assigned-clock-parents = <&sys_clkin2>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp2_pins>;
status = "okay";
//status = "disabled";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 4 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 2 2 2 1 1 1 1
>;
tx-num-evt = <8>;
rx-num-evt = <8>;
};
---------------------------------
DSP: the IPC example code ex02_messageq from the packages below:
ipc_3_43_02_04/examples/DRA7XX_linux_elf/ex02_messageq
pdk_am57xx_1_0_4/packages/ti/drv/mcasp/example/evmAM572x/DeviceLoopback/c66
My MainDsp1.c from IPC:
------------------------------------------------------------
//from MainDsp1.c Void smain(UArg arg0, UArg arg1) { Int status = 0; Error_Block eb; Bool running = TRUE; Log_print0(Diags_ENTRY | Diags_INFO, "--> smain:"); Error_init(&eb); /* initialize modules */ Server_init(); /* turn on Diags_INFO trace */ Diags_setMask("Server+F"); Log_print0(Diags_ENTRY, "\r\nAudio Sample Main\n"); Log_print0(Diags_ENTRY, "<-- main: wait forever"); /* code inserted to enable MCASP*/ /* enable the pinmux & PSC-enable for the mcasp device */ configureAudio(); McaspDevice_init(); Audio_echo_Task(); /* code inserted to enable MCASP end*/ /* loop forever */ while (running) { /* BEGIN server phase */ /* server setup phase */ status = Server_create(); if (status < 0) { goto leave; } /* server execute phase */ status = Server_exec(); if (status < 0) { goto leave; } /* server shutdown phase */ status = Server_delete(); if (status < 0) { goto leave; } /* END server phase */ } /* while (running) */ /* finalize modules */ Server_exit(); leave: Log_print1(Diags_EXIT, "<-- smain: %d", (IArg)status); return; }
Any help would be appreciated. Please let me know if you need anything else. Thank you!!