SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
The MCASP features a digital loopback mode (DLB) that allows loopback test transfers in TDM mode between MCASP transmitters and receivers within the same device. In loopback mode, the output of a transmit serializer is connected internally to the input of a receive serializer. Therefore, a receiver data can be checked against a transmitter data to ensure that the MCASP settings are correct. Digital loopback mode applies to TDM mode only (2 to 32 slots in a frame). It does not apply to DIT mode (XMOD = 0x180) or burst mode (XMOD = 0).
Figure 12-278 shows the basic logical connection of the serializers in loopback mode.
Two types of loopback connections are possible, selected by the ORD bit in the digital loopback control register - MCASP_DLBCTL as follows:
User can choose in software (the MCASP_DLBCTL[4] IOLBEN bit) between a MCASP module internal loopback and a device I/O level loopback.
When a MCASP internal loopback is selected (MCASP_DLBCTL[4] IOLBEN = 0b0 ), it is NOT necessary to configure MCASP_PFUNC and MCASP_PDIR registers for MCASP pin settings. Nevertheless, data can be optionally made externally visible at the I/O pin of the transmit serializer, if the pin is configured as a MCASP output pin by setting the corresponding MCASP_PFUNC bit to 0 (this is, to function as MCASP, not GPIO) and MCASP_PDIR bit to 1 (output).
When a device I/O level loopback is selected (MCASP_DLBCTL[4] IOLBEN = 0b1 ), the MCASP_PFUNC and MCASP_PDIR registers must be configured with the appropriate settings for all AXRn pins, according to ORD bit configuration.
In case of device I/O loopback, the connectivity is externally applied between device pads (this is, reaching device I/O buffers ).
When in loopback mode, the transmit clock and frame sync are used by both the transmit and receive sections of the MCASP. The transmit and receive sections operate synchronously. This is achieved by setting the MCASP_DLBCTL[3-2] MODE bit field to 0x1 and the MCASP_ACLKXCTL[6] ASYNC bit to 0b0.