View previous topic :: View next topic |
Author |
Message |
billpa
Joined: 30 Mar 2010 Posts: 3
|
multiple instances of built-in functions with PCD? |
Posted: Tue Apr 26, 2011 11:42 am |
|
|
Hi,
I need to do 32 bit integer multiplies and divides at both interrupt and task time with PCD. But, I can’t have global interrupts disabled at task time in the MULS3232 and DIVS3232A functions generated by the compiler.
Is it possible to tell the compiler to create another instance of these two functions? Or, anybody have 32 bit integer mul/div source available?
Thanks!
Bill _________________ Bill |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
billpa
Joined: 30 Mar 2010 Posts: 3
|
|
Posted: Tue Apr 26, 2011 12:27 pm |
|
|
THANK YOU!!! _________________ Bill |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19546
|
|
Posted: Tue Apr 26, 2011 2:49 pm |
|
|
Seriously though, try to work out a way of avoiding the divides!....
Remember that /2,/4 etc., can be done using a shift. It is often possible to scale numbers 'up', using a multiply, and then use one of these. Difference in time is really major. Worth thinking very carefully if you can about this....
Best Wishes |
|
|
|