TI E2E Community
MSP430 Ultra-Low Power 16-bit Microcontroller Forum
Help - overwriting DCOCTL
I am having a serious problem with my MSP430F2618 (I am using IAR Workbench 5.1) . I really need ideas/help on how to track it down.
After initialization, the clock module is set to: DCOCTL = 0x7E, BCSCTL1 = 0xBD, BCSCTL2 = 0x30 and BCSCTL3 = 0x0C. The specific values are not important. What is important is that, unexpectedly, those values change to: DCOCTL = 0x60, BCSCTL1 = 0x87, BCSCTL2= 0x00 and BSCCTL3 = 0x04.
These values are the default values after a reset. But there is no reset happening as far as I can see. And not even an oscillator fault. I have no idea why this is happening. I have looked all over my code and I just can't find what I am doing wrong. And worse, I do not know how to troubleshoot this problem.
I have tried to set up a breakpoint to see who is writing to those locations (Range @ Memory:0x56-0x58 [MAB-RW] ). But it does not trigger.
I am sure some of you will have some helpful ideas on what to try to figure this out.
Thank you in advance.
Andres Aguirre But there is no reset happening as far as I can see.
Thank you for the idea, Chester.
I tried it, but did not seem to work.
I have two I2C chips I am talking to. I commented them out for now and it seems that I can run without problems (i.e. no resetting of DCOCTL). I do not know why or how this is the case. I will try to make some progress while I win some time to figure out what is crashing my system. Pleae let me know if you have other suggestions.
If your code did not do anything to the WDT, it will reset the chip.
If you do not have a external pull-up resistor and a pull-down capacitor connected to the RST/NMI pin, EM noise may also trigger a reset.
Also, if you enabled interrupt (for example when you include I2C) but do not have an ISR to handle the interrupt, it will crash and may cause a reset.
Thank you for your suggestions.
I will check the interrupts and perhaps add some dummy interrupt service routines. My problem seems to be related to the I2C, but I am not sure.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.