This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Calculating delay for Toggling LED to visually check for data transmission

Other Parts Discussed in Thread: HALCOGEN

I am transmitting data to another board and use LED toggling to verify the data transmission. Since I need to visibly make sure that the data is tranmsitted, I have to give a certain delay (bsically a simple while/for loop). I have come across function with a value inside the loop. I need to know the basis for that value in the loop.

For example ,

1
2
3
for(i=0U;i<xxxxU;i++)
{
}/* Wait */

 How to decide a value of XXXX to select a 4ms delay????

Also how do I decide a delay of 4ms in my TI-Hercules TMS570LS3137. Could anyone please explain.?

  • Good day have you!

    for such things you should use the RTI, this gives high precision delays.

    Halcogen >> Examples >> example_rtiBlinky.c

    to vary the time value, you must use the function:

    void rtiSetPeriod ( uint32 compare, uint32 period )

    if you want to use the method of delays by loops, no repeatable timing when you try to use delays microseconds.


    Regards
    Martin V.