Other Parts Discussed in Thread: MOTORWARE
Hello,
in timer.c, (as supplied with motorware_13, unchanged from earlier versions):
timer->TPR |= ((uint32_t)(preScaler & 0xFF00) << 16) | ((uint32_t)(preScaler & 0x00FF) << 8);
I think this should be:
timer->TPR = ((uint32_t)(preScaler & 0xFF00) << 8) | ((uint32_t)(preScaler & 0x00FF));
To get the correct bitshift, and also do not *OR* as that will give strange results when modifying a non-zero prescaler.
Regards,
Harry