I'm working on a project where a sensor measures distance. I'm using an LPC804 on an eval board, and I figured if I flash the MCU I could use PuTTy (or another COM port sniffing tool) to read the measurements.
I use the standard printf("%u", var) where "var" holds the value of the measurement in mm.
I flashed the MCU so the IDE would'nt block the COM port, but I still can't read anything from the MCU via PuTTy or other programs.
I'm confident that PuTTy is set up right, so it must be something on the MCU side, that is not working correctly.
This is the first time I'm working with a "real" MCU, (read: not an Arduino/raspberry pi), and I wonder if there's some setup, that I need to do? I have added the following to my pin_mux.c file:
void BOARD_InitPins(void)
{
CLOCK_EnableClock(kCLOCK_Swm);
SWM_SetMovablePinSelect(SWM0, kSWM_USART0_TXD, kSWM_PortPin_P0_4);
SWM_SetMovablePinSelect(SWM0, kSWM_USART0_RXD, kSWM_PortPin_P0_0);
CLOCK_DisableClock(kCLOCK_Swm);
}
I found the above code in the example code, that is mentioned below. It didn't do the trick. I also chose the SDK debug console to be UART console in stead of semihosting.
As a bonus info I can say that I tried out the "lpc_i2c_polling_b2b_transfer" example. In the readme file it stated that one simply can use PuTTy to read what's being sent from master to slave and vice versa. I was also unsuccesful in trying to catch the communication between master and slave in this example, so I must have missed something.
Any tips or hints is appreciated a lot!