Hello There!
I’m currently trying to program a AX8052F143 with a GPS module. I need to use the UART0 but I can’t read and print what the GPS module is outputting.
I have tried to use ch = UART0_RX() with an interrupt but it never triggers the interrupt
I define my UART0 like this:
void initUART()
{
DIRA |= (1 << 0); // make Pa0 output
DIRC |= (1 << 2); // make PC2 output
DIRC &= 0xF7; // make PC3 input
PALTC |= (1 << 2); // enable U0TX on PC2
PINSEL |= (1 << 0); // enable U0RX on PC3
EIE |= (1 << 4); // enable uart0 interrupt
uart_timer1_baud(CLKSRC_LPXOSC, 9600, 32768000);
uart0_init(1, 8, 1); // timer0, 8 bits, 1 stop bit
//dbglink_writestr("Test at main");
}
and then define the interrupt like this:
__reentrantb void uart0_irq(void) __interrupt(INT_UART0)
{
static char ch;
ch = uart0_rx(); // read char from fifo
dbglink_writestr(ch);//and this is empty
}
I can see a train of square signals coming from the GPS and they make it to the input of the UART discarding the possibility of poor connection
Can anyone help?
Thank you very much
Guillermo