MC56F84786 DMA UART Demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC56F84786 DMA UART Demo

Jump to solution
1,026 Views
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 Kudos
Reply
1 Solution
976 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,014 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls refer to the attached example.

Hope it can help you

BR

XiangJun Rong

0 Kudos
Reply
986 Views
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

 

 

0 Kudos
Reply
977 Views
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 Kudos
Reply