To execute two different data for EQADC streaming mode on MPC5777C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

To execute two different data for EQADC streaming mode on MPC5777C

跳至解决方案
1,503 次查看
berat24
Contributor III

Hello everyone,

I have a problem about EQADC streaming mode. 

When I write one command to CFIFO by setting REP and PAUSE bit on same command for streaming mode, I can receive data correctly on each trigger. 

However, when I write two commands to CFIFO by setting REP on first command and setting PAUSE on second command, I cannot receive any data. 

Which point could I ignore?

 

You can find my a part of my code below.

void eDMA_Init_Receive(DMA_Type* dma, uint32_t channel, uint32_t *sourceAddr, uint32_t *destAddr, uint32_t ByteCount)
{
// SOURCE ADRESS
dma->TCD[channel].SADDR = (uint32_t)sourceAddr;
// SMOD AND DMOD ARE 0
// SSIZE AND DSIZE ARE 8 BIT (0X0)
dma->TCD[channel].ATTR = 0x0000;
// SOFF IS 1 BYTE. AFTER COMPLETING ONE TRANSFER, THIS IS ADDED TO SADDR
dma->TCD[channel].SOFF = 1;
// NBYTE 
dma->TCD[channel].NBYTES.MLNO = ByteCount;
// SLAST IS -400. THIS VALUE IS USED TO RETURN SADDR TO FIRST ADRESS VALUE
dma->TCD[channel].SLAST = -ByteCount;
// DESTINATION ADRESS
dma->TCD[channel].DADDR = (uint32_t) destAddr;
dma->TCD[channel].DLASTSGA = -ByteCount;
// THE NUMBER OF MAJOR LOOP
dma->TCD[channel].CITER.ELINKNO = 1;
// DOFF IS 1 BYTE. AFTER COMPLETING ONE TRANSFER, THIS IS ADDED TO DADDR
dma->TCD[channel].DOFF = 1;
// BITER IS EQUAL TO CITER. AFTER CITER REACHES O, CITER WILL BE EQUAL BITER AGAIN.
dma->TCD[channel].BITER.ELINKNO = 1;
dma->TCD[channel].CSR = 0;
dma->ERQL |= (0x1<<channel);

dma->CR = 0xC;

}

SIU->ISEL5 = 0x20000;
SIU->ISEL9 = 0x50000;


EQADC_0->CFCR0 = 0X0C550000;
EQADC_0->IDCR0 |= (1<<29);

EQADC_0->IDCR0 |= (1<<17);

EQADC_0->IDCR0 |= (1<<16);

EQADC_0->IDCR0 |= (1<<1);

EQADC_0->IDCR0 |= (1<<0);

EQADC_0->CFPR[0] = 0x20000000;
EQADC_0->CFPR[0] = 0x44100100;
eDMA_Init_Receive(DMA_0, 1, 0xFFF80030, &value, 4);
eDMA_Init_Receive(DMA_0, 3, 0xFFF80034, &value1, 4);

0 项奖励
回复
1 解答
1,491 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Yes, it is needed to use 4-bytes for source/destination size.

Example to eQADC DMA configuration you may see for instance here:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5674F-eQADC-eDMA-Single-Scan-CW210/ta...

Using of streaming mode does not affect it anyhow, you may use the same configuration.

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,492 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Yes, it is needed to use 4-bytes for source/destination size.

Example to eQADC DMA configuration you may see for instance here:

https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5674F-eQADC-eDMA-Single-Scan-CW210/ta...

Using of streaming mode does not affect it anyhow, you may use the same configuration.

 

0 项奖励
回复
1,494 次查看
berat24
Contributor III

I think, my fault is that I configure SSIZE and DSIZE as 1 byte (8 bits). If I arrange these two values as 4 byte(32 bits), problem could be disappear.

Could you give me feedback about that?

0 项奖励
回复