Keil Logo Arm Logo

Discussion Forum

LPC2468 OEM Board

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
prasad krsv
Posted
2-May-2007 10:01 GMT
Toolset
ARM
New! LPC2468 OEM Board

Forum for LPC2468 OEM board with NXP's ARM7TDMI LPC2468 microcontroller

Read-Only
Author
Andy Neil
Posted
2-May-2007 11:33 GMT
Toolset
ARM
New! RE: LPC2468 OEM Board

what is your question?

Read-Only
Author
prasad krsv
Posted
2-May-2007 12:50 GMT
Toolset
ARM
New! RE: LPC2468 OEM Board

Hi Neil,

We bought LPC2468 OEM board from EmbeddedArtists.We downloaded the sample programs from embedded artists.We downloading the programs on FLASH using J-TAG. We tested UART program with KEIL development tools on LPC2468O OEM board which is working.Iam able to see the messages on hyperterminal,where the messages are from the keyboard.

Now we want to print the debug messages on hyperterminal with UART program where messages are from printf(),or some other functions which contains the data.

we modified the UART program but iam unable to send the data to hyperterminal from a function which contains the data.

How can we do that?

Read-Only
Author
Bruno Coppi
Posted
3-May-2007 21:49 GMT
Toolset
ARM
New! RE: LPC2468 OEM Board

You have to look at the Realview C Compiler User's Manual (RV_cc.PDF).
Chapter 5.10 explains how to customize the I/O functions behaviour; moreover, have a look at the examples, which use the RETARGET.C file.

Read-Only
Author
prasad k
Posted
4-May-2007 06:31 GMT
Toolset
ARM
New! RE: LPC2468 OEM Board

Thanks Bruno,
I solved that problem.I changed the startup.s file from the working copy and included in my new project.I am able to send the data to hyperterminal with a function which contains the data.

I am facing one more problme with RTOS(RTX kernel) in keil.I wrote a simple program which creat a task and send data to serialport.before creating the task i initialized the UART.

I followed RTL-ARM User's Guide to write the program using his RTX kernel and i included configuration file for that and i successfully compiled and i downloaed the code into flash using J-TAG but it is not working.What ever he said in user's guide i followed but it is not working.

CODE what i was written .


#include "LPC23xx.h"
#include "type.h"
#include "target.h"
#include <stdio.h>
#include <RTL.h>

#define CR     0x0D

int sendchar (char ch)  {

  if (ch == '\n')  {
    while (!(U1LSR & 0x20));
    U1THR = CR;
  while (!(U1LSR & 0x20));
  return (U1THR = ch);
}

void PrintDbg(char *str)
{
  while (*str++) {
     sendchar(*str);
  }
}
void  UARTInit(DWORD baudrate)
{
    DWORD Fdiv;

    PINSEL7 |= 0x0000000F;

    U1LCR = 0x83;
    Fdiv = ( Fpclk / 16 )
    U1DLM = Fdiv / 256;
    U1DLL = Fdiv % 256;
    U1LCR = 0x03;
    U1FCR = 0x07;

}

void Init(void) __task
{

   PrintDbg("Hello \n");
   while(1)
     PrintDbg("... PRASAD@OCTI.COM ... \n");
}

int main (void){

  UARTInit(115200);     /* baud rate setting */
  os_sys_init(Init);
  while(1);
  return 0;
}

I Included RTX_Conf_LPC23xx.c from the keil directory and in Target options i selected the operating system as RTXKernel.

What might be the reason?why the program is not working.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.