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();
#endifPRINTF("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 ;
}
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
Hello,
I review your code and your image but is difficult to review what is missing.
Best regards,
Pavel