This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

serial port communication with OMAP-L138 LCDK ARM

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hello e2e,

I'm starting a project with the OMAP-L138 LCDK and I'll need to communicate with a peripheral via RS232. I plan to do this from the ARM processor through UART1. I have some existing code that runs on a Linux desktop that I had hoped to use, but haven't had much luck getting it to compile in CCS V6. I had issues with finding the right header files. I'm new to the embedded world, but my thought was that since the ARM will be running Linux, I'd be able to use my existing code without much difficulty. The code is pretty standard serial stuff:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>

int main () {
    struct termios options;
    unsigned int fd = -1;
    fd = open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NDELAY);
// etc, etc... }

My questions are:

(1) Would this be the right approach for getting RS232 communications on the ARM? If so, should I be getting the header files from my mcsdk directory (mcsdk_1_01_00_02)? Or is there another approach I should use

(2) I see that there is a Starterware uart example, but I've also read that the Starterware code is written for running without an OS. Is this correct and does it mean that it's not useful for my purposes?

(3) I looked through the technical reference guide (spruh77a) and in the uart initialization section it refers to me to a "device-specific data manual". What is this referring to and where might I find it?

Thanks so much for any guidance!

  • Hi Patrick,

    (1) Would this be the right approach for getting RS232 communications on the ARM? If so, should I be getting the header files from my mcsdk directory (mcsdk_1_01_00_02)? Or is there another approach I should use

    Yes, you can use this code if you want to work with ARM & Linux OS.


    (2) I see that there is a Starterware uart example, but I've also read that the Starterware code is written for running without an OS. Is this correct and does it mean that it's not useful for my purposes?

    Yes, you are right. Starterware is just bare metal code (non-OS), so its depends on your requirement whether you want to use it or not.


    (3) I looked through the technical reference guide (spruh77a) and in the uart initialization section it refers to me to a "device-specific data manual". What is this referring to and where might I find it?

    "Device data manual" is OMAPL138 data sheet since the "psruh77a" is a technical reference manual (TRM) for OMAP processor variations.
    If you use exact OMAPL138 then you need to check the data sheet of your processor.

    www.ti.com/.../omap-l138.pdf

    Please ask us if any clarifications.
  • Thanks for the link to the document. I'll have to get to the UART code later.

    Patrick
  • I did get uart1 running with the arago toolchain after sorting through the config registers and following this regarding the LCDK board:

    e2e.ti.com/.../722900
  • Sounds good.
    I'm glad that you able to got working.
    Thanks Patrick for sharing the link.