HalFlashWrite puts the DMA to work, but then it puts the CPU in a while loop until the DMA operation is finished instead of freeing the CPU to go into low power mode I think.
The line " while (FCTL & 0x80); " seems to imply that we wait for the DMA to finish, but this bit should go high after the first word is written. I'm not sure what we gain from this. Its a false sense of security.
If the CPU really is tied up while the DMA is in operation, I need to know why so that any changes don't interrupt the rest of the stack. If not, then why was "while (FCTL & 0x80); " written?