stmhal: Fix write_timed function for DAC(2).

Addresses issue #617.