This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2468 OEM Board

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

Parents
  • 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.

Reply
  • 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.

Children
No data