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

Embedded C code for lpc2148 works on simulator not on hardware

 A simple embedded c code was written to display hello world code on terminal window. At first a char pointer was created to store hello world. Checked UOLSR register to see if UOTHR was empty .if it was then the data was loaded into UOTHR using pointer. After running the code I got the required output on the uart1 window(view->serialwindow->#uart1).

But when I tried to dump the code on lpc2148 kit using flash magic and then tried to execute it...the terminal window showed strange characters on screen.

Parents
  • A possible reason for the issue is different clocks set for the simulator and what is actually used on your hardware, that baud rate does not fit your board. So you should check what is the clock frequency on your board and adjust the baud rate configuration to that. Then you can also adjust the Options for Target ... -> Target -> Xtal value to use the same in the simulation.

Reply
  • A possible reason for the issue is different clocks set for the simulator and what is actually used on your hardware, that baud rate does not fit your board. So you should check what is the clock frequency on your board and adjust the baud rate configuration to that. Then you can also adjust the Options for Target ... -> Target -> Xtal value to use the same in the simulation.

Children