A DC motor controller, the controller comprising: a period detector, wherein the period detector is configured to detect a period associated with a DC motor, wherein the DC motor includes a plurality of phases to which current is applied in accordance with a plurality of commutation states, and wherein the plurality of commutation states includes at least a first commutation state and a second commutation state; an initial commutation state controller, wherein the initial commutation state controller is configured to: initialize an up/down counter; induce a first current in the plurality of phases in accordance with the first commutation state; increment the up/down counter until the first current achieves a threshold in the first commutation state; induce a second current in the plurality of phases in accordance with the second commutation state; decrement the up/down counter until the second current achieves the threshold in the second commutation state; store the sign bit of the up/down counter; and determine a desired initial commutation state based at least in part on the sign bit of the up/down count, characterized in that the controller being further configured to: - initialize a first register with a desired current threshold value, - initialize a second register with a desired timeout value; - load an up counter with zeros by asserting a load enable signal, and - load the up/down counter with zeros by asserting a load signal (block 410); - cause inducing of a current in the motor in accordance with one commutation state (block 415); - monitor the motor, after the current is induced (block 415), to determine whether a current threshold has been achieved (block 420); - update the up/down counter (block 425) in case the current threshold has not yet been achieved (block 420), - wherein this updating includes incrementing the up/down counter when the commutation state is even, e.g., 0, 2, 4 for positive currents, and decrementing the up/down counter when the commutation state is odd, e.g., 1, 3, 5 for negative currents; - determine, once the current threshold is achieved (block 420), if the commutation state is even (block 430), - increment the commutation state, i.e., from 0 to 1, from 2 to 3, or from 4 to 5, (block 445), in case the commutation state is even (block 430). - initialize a first register with a desired current threshold value, - initialize a second register with a desired timeout value; - load an up counter with zeros by asserting a load enable signal, and - load the up/down counter with zeros by asserting a load signal (block 410); - cause inducing of a current in the motor in accordance with one commutation state (block 415); - monitor the motor, after the current is induced (block 415), to determine whether a current threshold has been achieved (block 420); - update the up/down counter (block 425) in case the current threshold has not yet been achieved (block 420), - wherein this updating includes incrementing the up/down counter when the commutation state is even, e.g., 0, 2, 4 for positive currents, and decrementing the up/down counter when the commutation state is odd, e.g., 1, 3, 5 for negative currents; - determine, once the current threshold is achieved (block 420), if the commutation state is even (block 430), - increment the commutation state, i.e., from 0 to 1, from 2 to 3, or from 4 to 5, (block 445), in case the commutation state is even (block 430).