To execute two different data for EQADC streaming mode on MPC5777C

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

To execute two different data for EQADC streaming mode on MPC5777C

ソリューションへジャンプ
1,505件の閲覧回数
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,493件の閲覧回数
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,494件の閲覧回数
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,496件の閲覧回数
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 件の賞賛
返信