All,
I am working on an assembly project in IAR using a 5-series MSP with USB. At the moment, the program synthesizes a sine wave using data loaded in info memory and the DMA module. I have observed the following:
1) The DMA does not run after a cold boot (<80mV on Vcore)
2) The timer that triggers the DMA does run like it should after cold boot, but does not actually trigger the DMA.
3) Using the FET debugger to diagnose the problem has been difficult, since I can't see what the register values are in memory while it is malfunctioning. Applying a reset causes the CPU to run properly.
4) A work-around I have devised is to test the cause of the previous reset at the end of peripheral initialization. If the cause was a software BOR, the program continues. If not, I execute a software BOR using the appropriate bit in PMMCTL0. After the restart and passing of the BOR-cause test, the program executes properly.
5) The problem seems tied to how quickly Vcc rises. A slow rising Vcc doesn't cause the malfunction. Our power supply on the board with the CPU can reach 3.3V in under 300us, compared to 30ms+ for the bench supply.
Since the software reset fixes the problem, I believe it is reasonable to think that there is not a bug in the code itself, as the problem would continue to repeat if there were. I will have to get authorization before I can post a snippet of the code here for analysis.
What I really need to know is this: Is there a specific sequence required to ensure that all of the MSP's registers get written properly during code execution?
Thanks for the help!