Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

high speed tracing

I have an embedded board with a 32 Micro-controller, and an custom built OS,

  • Unfortunately, as of now, connection to the PC is only through serial port,
  • Internal memory is limited to 512KB.
  • There are at-least 10 tasks in the system

Question,

  • I want to capture the sequence in which task switch happens,
  • And when I try to write into the RAM, it overflows ~~
  • And when I try to send it though serial port, the system behavior changes (as serial port is slow)

There is no persistent storage like NAND FLASH, or something.

  • Can you guys think of some Idea?

If there is no way with Serial port,

  • Can you guys recommend some other interface or than Serial port.
like image 417
Alphaneo Avatar asked Nov 25 '09 07:11

Alphaneo


People also ask

What is high speed routing?

“High-speed routing” is an abbreviated description of routing copper traces on a printed circuit board in ways that minimize the undesirable parasitic effects that can occur with high-speed signals.

What is considered high speed design?

High speed design specifically refers to systems that use high speed digital signals to pass data between components. The dividing line between a high speed digital design and a simple circuit board with slower digital protocols is blurry.

What is high speed signal?

High-speed signals have broad bandwidth, meaning the high-speed signal frequency range extends theoretically out to infinity. Although signals are band-limited when recovered by a high-speed receiver, your interconnect design should account for the entire signal bandwidth.


3 Answers

You probability want to determine why your RAM overflows when logging, you don't need much logging if you log only what you need to see. You can log into a circular buffer to prevent overflow. With Ram logging you probably can run at close to true speed. Logging to a communications link added latency, interrupts and task switches to the system.

Don't log everything from the start. Log only enough to understand when your problem occurs. Once you know when your problem occur log more detail as soon as the problem section is entered.

If you really want to solve the problem in no time get a Green Hills Trace pod. Your hardware must be designed to allow the Pod to be connected and it is terribly expensive. However the results is incredible ...

like image 116
Gerhard Avatar answered Oct 20 '22 20:10

Gerhard


If you can use an output port on the microcontrollers without disturbing other hardware too much you can output the current task number and capture it with a logic analyzer.

like image 28
starblue Avatar answered Oct 20 '22 18:10

starblue


  • And when I try to write into the RAM, it overflows ~~

What are you logging and how large a buffer do you allow? Without knowing how you implemented this it is hard to advise, but there is probably much you could do to optimise in-memory logging.

If at each context switch you log task ID and time-stamp (say 3 bytes per event) you should get 341 context switches per Kbyte. In many systems that would be a significant period, and remember that is for just 1K of buffer. If you are logging interrupts as well that may be more expensive, as would logging all system calls rather than just context switches. Perhaps you could implement a filter in the logging, so it only logged tasks or events of interest. You might also implement event triggers so that the logged data is automatically dumped to your serial port when such an event occurs (and when the event of interest has occurred, so the act of transmission is not intrusive to your investigation). You should also implement the buffer as a circular buffer so that rather than overflowing, the oldest data is simply discarded to make room for the new, so that on occurrence of a trigger event, you have all the event information leading up to it.

like image 25
Clifford Avatar answered Oct 20 '22 18:10

Clifford