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

Help: I want to measure time of Flash Write operation

Dear Friends.

I am using LPC 2138 (ARM) processor. I am using its flash memory to store large data. I want to measure exact time, processor requires to complete whole write operation.

To do this can any one tell me how to make use of onchip hardware timers [Timer0 or Timer1] to measure require to complete such write operation. Please note I am new to hardware Timers.

- Thanks in advace
Raj Mittal

Parents
  • "WHY do you want to 'measure exact time, processor requires to complete whole write'"

    And why do you want to have it in your code?

    Would it not be simpler to just set some port pin at the start of the operation, clear it at the end, and use an external timing device to do the timing?
    (an oscilloscope should be sufficient)

Reply
  • "WHY do you want to 'measure exact time, processor requires to complete whole write'"

    And why do you want to have it in your code?

    Would it not be simpler to just set some port pin at the start of the operation, clear it at the end, and use an external timing device to do the timing?
    (an oscilloscope should be sufficient)

Children
  • Spoken like a true hardware guy :)

    Scopes aren't so common that everyone always has one at their desk. I'd be tempted just to set a timer and read the result just so that I didn't have to go back into the lab, round one up, and start probing pins on a BGA package.

    Besides, I've got the code sitting around anyway, as I always wind up having to do minor bits of profiling and timing here and there. Much faster just to throw in a couple of procedure calls into the source and rebuild.

    I'm somewhat curious as to why measuring the actual time matters, since the system has to be designed to tolerate the worst case found in the data sheets. And that worst case is usually significantly larger than the typical case. If you code failure timeouts and the like for a typical case, your system will just fail in actual operation when you happen to hit a slow bit pattern. Measuring a few actual cases doesn't tell you much about the requirements of the part. But the OP could be creating a test rig, or just investigating, I suppose.