MIMXRT1011 LPUART DMA Configuration

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

MIMXRT1011 LPUART DMA Configuration

693 Views
byildirim
Contributor I

Hi,

Currently I'm tring to configure and use LPUART Rx with DMA but couldn't handle the configuration by using MCUXpresso. In debugging mode there is no entering the callback function when I send some bytes through the LPUART over serial terminal in MCUXpresso. When I try to use example that in the IDE, it works well. But my configuration is not handling any callback function. I have just tried to compare the codes but couldn't see the difference. Of course I have missed something but I couldn't find what is that I'm missing. 

You can find my code and configurations below.

#include <stdio.h>
#include "board.h"
#include "peripherals.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "MIMXRT1011.h"
#include "fsl_debug_console.h"
/* TODO: insert other include files here. */

/* TODO: insert other definitions and declarations here. */
void lpuart1_cllbck(LPUART_Type *a, lpuart_edma_handle_t *b, status_t c, void *d)
{
LPUART_WriteBlocking(LPUART1, (uint8_t *)"Callback\n", sizeof("Callback\n"));
}
/*
* @brief Application entry point.
*/
int main(void) {

/* Init board hardware. */
BOARD_ConfigMPU();
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL
/* Init FSL debug console. */
BOARD_InitDebugConsole();
#endif

PRINTF("Hello World\n");

/* Force the counter to be placed into memory. */
volatile static int i = 0 ;
/* Enter an infinite loop, just incrementing a counter. */
while(1) {
i++ ;
/* 'Dummy' NOP to allow source level single stepping of
tight while() loop */
for(int j = 0; j < 50000000; j++)
{
}
//LPUART_WriteBlocking(LPUART1, (uint8_t *)"Merhaba\n", sizeof("Merhaba\n"));
__asm volatile ("nop");
}
return 0 ;
}

cokPisGomerim_0-1672920412002.png

cokPisGomerim_1-1672920436403.pngcokPisGomerim_2-1672920461918.png

 

 

Labels (1)
Tags (2)
0 Kudos
3 Replies

661 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

Could you tell me what is the example you mentioned is working well? or what is the example you are based on?

Best regards,
Pavel

0 Kudos

637 Views
byildirim
Contributor I
Hello,
The example named as "lpuart_edma_transfer" and SDK version is 2.12.1. SDK version is same as mine project.
Best regards
0 Kudos

596 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, 

I review your code and your image but is difficult to review what is missing.

Best regards,
Pavel

0 Kudos