Hi, thanks for responding. I'm using MCUXpresso IDE v24.12, and I make my configurations using the config tool. For now, I'm only testing a global variable that increments in the main loop. I don't have any clock issues because UART was already running and works fine. I wanted to see the variable update in real-time in the live expressions initially to continue with other project needs and monitor variable values while running the program. When I talk about a Chinese programmer, I'm referring to a J-Link Segger v9-G programmer I bought on AliExpress. When I say Chinese programmer, I mean it's not original, but I don't think that's the problem. My initial test code is this:
#include "pin_mux.h"
#include "board.h"
#include "fsl_uart.h"
#include "fsl_debug_console.h"
#include <string.h>
/*******************************************************************************
* Definitions
******************************************************************************/
#define DATA_UART UART0
#define DATA_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_BusClk)
#define DATA_UART_IRQn UART0_IRQn
#define DATA_UART_IRQHandler UART0_IRQHandler
/*******************************************************************************
* Variables Globales
******************************************************************************/
uint32_t conta = 0;
unsigned char rx_aux;
/******************************************************************************\
*
* ************************* otra recepcion uart de prueba ******************
*/
void UART0_IRQHandler(void) {
if (UART0->S1 & UART_S1_RDRF_MASK) {
rx_aux = UART0->D; //lê o caracter recebido
}
}
/*******************************************************************************
* Main Application
******************************************************************************/
int main(void) {
uart_config_t uart_config;
/*** 1. INICIALIZACIÓN ***/
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitDebugConsole();
/*** 2. CONFIGURACIÓN UART0 ***/
UART_GetDefaultConfig(&uart_config);
uart_config.baudRate_Bps = 115200;
uart_config.enableTx = true;
uart_config.enableRx = true;
UART_Init(DATA_UART, &uart_config, DATA_UART_CLK_FREQ);
/*** 3. CONFIGURACIÓN INTERRUPCIONES ***/
DATA_UART->C2 |= UART_C2_RIE_MASK; // Habilita interrupción RX
NVIC_SetPriority(DATA_UART_IRQn, 0);
NVIC_EnableIRQ(DATA_UART_IRQn);
while (1) {
conta++;
/********************************************************/
// Delay mínimo
for(volatile int i = 0; i < 50; i++);
}
}