Configuration commands have to be repeated twice within 100ms without any other command in between before the control gear will accept them. This is done as a way to avoid corruption of the signal or spurious messages accidentally changing a configuration. DALI frames are Manchester encoded which prevents single bit flips of the frame causing problematic ...
You have to setup and Reset your Watchdog Timer in one go. If you setup and reset separately then it keeps on resetting.
WDT_A->CTL = WDT_A_CTL_PW | WDT_A_CTL_HOLD; // stop watchdog timer
P2->DIR = BIT2 | BIT1 | BIT0;
P2->OUT &= ~(BIT2 | BIT1 | BIT0);
P2->OUT = ...
This answer is intended to augment the currently accepted answer with a concrete example in two variants, and provide some specific design advice.
Polynomial approximation is often a superior approach if the desired accuracy is fairly high and there is a hardware multiplier available. Table sizes tend to increase rapidly even when interpolation (e.g. linear, ...