2005-02-04 12:42 AM
2011-05-17 01:18 AM
hello
my st7fmc takes 31µs to multiplicate two 16bit variables. I'm using the metrowerks compiler. I know that it's difficult for the µC to handle 16bit variables, but this time is impossible for my application. can anyone tell me if this is right or do I have problems with compiler settings or something else. thanks a lot for your help best greetings klaus2011-05-17 01:18 AM
Hello,
have you tried to perform such a computation by writing from your own the multiplication operation using ASM coding so avoiding the overload caused by the C compiler? Regards, Tanio2011-05-17 01:18 AM
hi
first i want to thank you for your help. i haven't tried to prgramm the multiplication in asm, because i'm not used to programming asm. i only have tried to measure how long the µc takes for several operations and there i found that a multiplication of two 16 bit numbers takes a lot of time. i don't want to use asm code, because no one will be able to understand the code in a few months or years. thanks for your help nice greetings klaus2011-05-17 01:18 AM
2011-05-17 01:18 AM
Hi Guys,
sorry for my intrusion... what is the clock frequency you are using? If you use 8MHz, 122 cycles are equivalent to about 15usec... It's not too bad..., is it?2011-05-17 01:18 AM
Dear Billino,
welcome to the motor control forum dedicated to ST micro products. Your calculus seems correct, and effectively 15 us seconds are acceptable when multiply to 16 bits operands. Best regards, Tanio