I just tried to use strotl() on the msp430f5437. It failed and I tracked the problem down to a problem with multiply. Check this out:

          register unsigned long int tmp1 = i;
          unsigned long int tmp2 = i;
          long int tmp3 = i;
          int tmp4 = i;
printf("i %lx tmp1 %lx tmp2 %lx tmp3 %lx tmp4 %x\n",i,tmp1,tmp2,tmp3,tmp4);
          tmp1 = tmp1 * base;
          tmp2 = tmp2 * base;
          tmp3 = tmp3 * base;
          tmp4 = tmp4 * base;
printf("i %lx tmp1 %lx tmp2 %lx tmp3 %lx tmp4 %x\n",i,tmp1,tmp2,tmp3,tmp4);

i 0 tmp1 0 tmp2 0 tmp3 0 tmp4 0
i 0 tmp1 3fff3fff tmp2 3fff3fff tmp3 3fff3fff tmp4 0


Any advice how to proceed with debugging this? Is this a problem with usage of hardwarde multiplier?

Reply via email to