MC56F84786 DMA UART Demo

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

MC56F84786 DMA UART Demo

跳至解决方案
1,025 次查看
IvyGuo
Contributor III

Please help to check the setting is right?  I neet a MC56F84786 DMA uart demo,here is my pe setting:

 

IvyGuo_0-1682048455812.png

in main.c,add the send code as below:

/* Write your local variable definition here */
unsigned char test_data[26] = "abcdefghijklmnopqrstuvwxyz";
unsigned char *pointer;
pointer = &test_data[0];
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/

/* Write your code here */
AS1_Init();
AS1_SendBlock(pointer,26,0);

But it seems not work,can not receive any character in putty terminal,Does NXP have an official UART DMA Demo or application notes?

0 项奖励
回复
1 解答
975 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The Sendblock() function just copies the array you want to transfer to a buffer, then use the interrupt mode to transfer the data.

char array[10]={'a','b'.....}

uint16_t number;

while(number!=10)

{

AM1_SendBlock(&array[0],10,&number)

}

Pls have a try

BR

XiangJun Rong

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,013 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to the attached example.

Hope it can help you

BR

XiangJun Rong

0 项奖励
回复
985 次查看
IvyGuo
Contributor III

Dear,Rong:

        Thanks for you quick reply,the demo works well ,but  how to  generate the sendblock  api?

When i enable tx and rx dma channel ,the sendblock api is aviable but can not work ,anyother setting

need  to set?

 

IvyGuo_0-1682393851691.png

 

 

标记 (3)
0 项奖励
回复
976 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The Sendblock() function just copies the array you want to transfer to a buffer, then use the interrupt mode to transfer the data.

char array[10]={'a','b'.....}

uint16_t number;

while(number!=10)

{

AM1_SendBlock(&array[0],10,&number)

}

Pls have a try

BR

XiangJun Rong

0 项奖励
回复