Other Parts Discussed in Thread: CONTROLSUITE
Hi,
I'd like to use the voltage level to measure the execution time of a generic function.
Could you make me an example how to set GPIO to get what I need?
Thank you in advance
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.
Other Parts Discussed in Thread: CONTROLSUITE
Hi,
I'd like to use the voltage level to measure the execution time of a generic function.
Could you make me an example how to set GPIO to get what I need?
Thank you in advance
If I understand what you are asking, it will look something like this:
//initializations
EALLOW;
GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 0; //GPIO18 as GPIO
GpioCtrlRegs.GPADIR.bit.GPIO18 = 1; //GPIO18 as output
GpioDataRegs.GPADAT.bit.GPIO18 = 1; //GPIO18 set to high
...
GpioDataRegs.GPADAT.bit.GPIO18 = 0; //GPIO18 set low to indicate start of code
//your code here
GpioDataRegs.GPADAT.bit.GPIO18 = 1; //GPIO18 set high to indicate end of code
Note that if using a scope to measure, this will only be accurate if (your code time) >> (GPIO toggle overhead time - about 4-5 cycles)
Also, if you haven't already, check out the examples in ControlSUITE
Thank you,
Now I'm working withouth the oscilloscope...
it could be the same by using the LED? Just for debug purposes..
Thank you in advance...
Wow, why so complicated? Do you use all 3 timers? If not I would use timer peripheral to measure execution time.
Regards,
Maciej
Hi
How to measure the execution time by using a timer???
Is it possible that without using oscilloscope can able to calculate execution time???
Thanks in advance
Thirumoorthy.R
You need to:
You can also measure time required to start and stop timer to get exact execution time. You need to calculate (or measure) time of 1 timer clock period to get execution time in [s].
If you need help with setting timer I recommend starting with following materials: http://e2e.ti.com/group/universityprogram/educators/w/wiki/2038.c2000-teaching-rom.aspx
Additionally you should find some examples in:
| C2833x/C2823x C/C++ Header Files and Peripheral Examples | SPRC530 | Application Software & Frameworks |
Hi ,
Thanks for your fast reply. I will try to configure my timer to measure a time period of function.
Regard's
Thirumoorthy.R
I'm using an F28035.
At the moment, I need just see on hardware when a function starts and stops... no more...
Thank you in advance
Hi pietro
You are correct. If you want to see the start and stop time means, You need to use a LED.
That is the easiest way to find start and stop time of a function in hardware.
Regard's
Thirumoorthy.R
I need only just a sample code... how to do thath in a simplest way?
Thank you,,,
Pietro Luigi Carotenuto said:I need only just a sample code... how to do thath in a simplest way?
See links from my previous post.
The following wiki article may also be useful in showing the various methods of profiling:
http://processors.wiki.ti.com/index.php/Profiling_on_C28x_Targets
-Brett
I'm using the following code:
EALLOW;
GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0;
GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1;
GpioDataRegs.GPBSET.bit.GPIO34 = 1;
but nothing happens (the LED should be on).
I have included the DSP280x_Project.h to my project.
Some help?
Pietro,
From my memory, the controlCARD's LED works with negative logic. Try GpioDataRegs.GPBCLEAR.bit.GPIO34 = 1; or GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1; instead.
Thank you,
Brett
It returns the following error:
C28xx: AutoRun: Target not run as the symbol "main" is not defined
And ...After some change:
Description Resource Path Location Type
unresolved symbol _GpioCtrlRegs, first referenced in ./main.obj Cskel1 C/C++ Problem
Description Resource Path Location Type
unresolved symbol _GpioDataRegs, first referenced in ./main.obj Cskel1 C/C++ Problem
Some help, please?