Tool/software: Code Composer Studio
Hi
I have here a gps module gy-neo6mv2 connected to my tiva launch pad through uart6 mounted on a truggy car. my question is how to print the content i get form "UARTCharGet" to the serial console
my idea is that to print always the coordinates that are sent by the gps to see where is my car
//PP0 -> RX , PP1 -> TX void GPSPosition(void) { uint32_t ui32Status; ui32Status = UARTIntStatus(UART6_BASE, true); //get interrupt status UARTIntClear(UART6_BASE, ui32Status); //clear the asserted interrupts gucRxChar = UARTCharGet(UART6_BASE); // printf("Coordinate : %c",gucRxChar); // i want to print the content here to the serial console UARTCharPut(UART0_BASE, gucRxChar); }
and here is the configuration for the uart
//PP0 -> RX , PP1 -> TX void UARTConfigGPS(void) { SYSCTL_RCGCGPIO_R |= (1 << 13); // port P while (!(SYSCTL_PRGPIO_R & (1 << 13))) ; GPIO_PORTP_DEN_R |= 0x03; // enable pin PP0, PP1 GPIO_PORTP_AFSEL_R |= 0x03; // enable alternate function GPIO_PORTP_PCTL_R |= 0x01; // enable U6Rx SYSCTL_RCGCUART_R |= (1 << 6); // UART 6 while (!(SYSCTL_PRUART_R & (1 << 6))) ; UART6_CTL_R &= ~0x01; // disable the UART6 // UART4_IBRD_R = 17; // baud rate of 57600 bit/s // UART4_FBRD_R = 23; // BRD = 104.16666667 UART6_IBRD_R = 104; // baud rate of 9600 bit/s UART6_FBRD_R = 10; UART6_LCRH_R = 0x60; // 8N1 bits frame and no parity bit UART6_CTL_R |= 0x201; // enable the UART6 as Rx UART6_ICR_R = 0xE7FF; // clear all interrupts UART6_IM_R |= 1 << 4; // activate UART6 Rx interrupts NVIC_EN1_R |= 1 << (59-32); // enable UART6 interrupt in the nested vector interrupt controller }
thanks in advance