Jump to content

TivaC LaunchPad Floating Point Timing

Recommended Posts

In TivaC Workshop Lab9 on the topic Floating Point, it has been shown that the compuatation time for each iteration loop which contains a sine calculation is approxly 7 microseconds.


I ran essentially the same program with Timer1 running in ONE-SHOT-UP mode at 50 MHz, which was started just before the sine calculation loop and the count was read out just after the loop was over. The value recorded was consistantly 171109

which gives total loop time of 342.2 microsec and each loop of 34 microsec.


The make file used  -mfloat-abi=softfp -mfpu=fpv4-sp-d16    compiler flags, Sourcery CB arm-none-eabi-


I am unable to reconcile the two results.

Can any one please clarify what is going on?


Link to post
Share on other sites


You should use the options -mfloat-abi=hard  -mfpu=fpv4-sp-d16  and link with the hardware floating point libraries m and c, to be found for instance in the following path
That is my path, check yours - if using windows should be your-gcc-path\arm-none-eabi\lib\armv7e-m\fpu\
If you don't find it - it is even possible even not to exist (The Lite version does not have it, at least the last year version - did not checked a newer version). 
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...