TDM with DataWire DMA on CYS0644ABZI-S2D44

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Matthis
Level 1
Level 1
First question asked Welcome!

Hello everyone,

I am trying to implement a TDM master on the CYS0644ABZI-S2D44 and keep running into problems with the DMA.

Im using the cyhal library as described here in Snippet 4: https://infineon.github.io/mtb-hal-cat1/html/group__group__hal__tdm.html

My problem is, that the event handler is never called. The reason for that seems to be the DMA, that the driver allocates for the operation. The debbuger tells me, that the allocated DMA is from type DataWire, which is reasonable, because thats the one optimized for peripheral <-> memory operations (https://infineon.github.io/psoc6hal/html/group__group__hal__impl__dma.html). Thing is, that the chips errata says, that this DMA does not work at all.

Unbenannt.png

I can get it working, adding this after the initialization:

//free dw and force dmac
{
	cyhal_dma_free(&p_tdm_object->rx_dma);
	p_tdm_object->rx_dma.resource.type = CYHAL_RSC_INVALID;
	result = _cyhal_dma_dmac_init(&p_tdm_object->rx_dma, NULL, NULL, CYHAL_DMA_PRIORITY_HIGH);
	if(CY_RSLT_SUCCESS != result)
	{
		printf("_cyhal_dma_dmac_init %u\n", (unsigned int) result);
	}
}

What this does is, it frees the allocated DataWire-DMA and replaces it with one of the DMAC-DMAs.

For low speed audio data, this works just fine, but at our target datarate of 32Bit/48kHz/8Channels, we run into problems. Another thing is, that 4 DMAs is not a lot, so that we are stuck with cpu-copying in another part of our application, forcing us to further reduce the maximum datarate.

So that is where Im stuck at the moment. I am grateful for any help 😕

Questions for the Community:

  • Has anyone tested another approach to use the TDM/I2S? Probably by writing your own driver that uses CPU-Copy instead. Is it reasonable to hope thats any more performant?
  • Has anyone did some benchmarking on whats the cost of using the unoptimized DMAC for short Peripheral-to-Memory operations instead of DataWire?
  • Is there a trick to get the DW-DMAs to work despite the errata sheet says no?

Questions for Infineon officials:

  • Fixed DataWire-DMA when? On the same Page of the errata-sheet, it says Q3 '21 and Q4 '22. That doesnt make me very confident about either of those dates, tbh.
  • Is this going to be a silicon-fix aka. do we need to buy new Chips?
0 Likes
2 Replies
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @Matthis 

I checking with the internal team on this and will provide an update when I receive a reply from them.

Best Regards
Ekta

0 Likes
Balis
Level 1
Level 1
5 questions asked 10 sign-ins First reply posted

Hello,

Any updates for this topic?

0 Likes