I am working on LM3S8962 and need to write a program to comunicate with PC via UART. I use Labview inline C node to write codes using ARM_Serial.c which is from Keil Software.
The file has
int ARM_Serial_InitPort (int serDevNo, unsigned long baudrate, unsigned int databits, unsigned int parity, unsigned int stopbits) int ARM_Serial_Write (int serDevNo, const char *buffer, int *length)
I tried to use them to control serial port, but it didn't work well. I used U0TX, U0RX and GND pins on micro controller to connect to a serial port in PC.
I couldn't find any information about ARM_Serial_InitPort and ARM_Serial_Write functions on the internet. Any information or tips about it would be very appreciatted.
Thank you.
Masa
Is it?
This sounds more like a Labview question to me...?
Yes, it is.
The header of the c file says
/*---------------------------------------------------------------------------- * Name: ARM_Serial.c * Purpose: For Luminary Micro LM3SXXXX microcontrollers * adapted from Template generic driver for LabVIEW * Version: v1.00 * Note(s): *---------------------------------------------------------------------------- * This file is part of the uVision/ARM development tools. * This software may only be used under the terms of a valid, current, * end user licence from KEIL for a compatible version of KEIL software * development tools. Nothing else gives you the right to use it. * * Copyright (c) 2007 Keil Software. *---------------------------------------------------------------------------*/
These codes bellow are test codes I wrote, which doesn't work. Did I make a mistake or do I need to do something else to use serial port?
//initialize serial port int ret; ret = ARM_Serial_InitPort(0, 9600, 8, 0, 10); printf("initialize-ret:%d",ret); //Write data to serial port int l = 5; int ret; char *x; x="test"; ret = ARM_Serial_Write(0, x, &l); printf("writing-ret:%d\n",ret);
So, I guess that's where you need to look for documentation on this?
Yes. But I couldn't find any information about it.
By the way, I noticed that my microcontroller which is connected to PC with USB cable creates a virtual com port in PC. And it seems that the virtual com port is receiving some data from the microcontroller instead of actual serial port.
View all questions in Keil forum