teoah 0 Posted November 18, 2010 Share Posted November 18, 2010 I've been tryin to get the code posted there to work on my EXP430G2 board (rev 1.4) with the G2231 but to no avail (even a straight copy/paste doesn't work). The code compiles and runs, but pressing the switch does absolutely nothing. Am I supposed to change something if I'm using the G2231? One thing I thought was the problem was this line: #define FLIP_HOLD (0x3300 | WDTHOLD) /* flip HOLD while preserving other bits */ Shouldn't the 0x3300 part be 0x5A00 (WDTPW)? (Although I tried that with no go). I tried playing around with the code, but nothing seems to work. Also, many changes he makes to WDTCTL is missing WDTPW. Is that a mistake? I tried adding it, but didn't make a difference either. Quote Link to post Share on other sites
simpleavr 399 Posted November 18, 2010 Share Posted November 18, 2010 Shouldn't the 0x3300 part be 0x5A00 (WDTPW)? (Although I tried that with no go). i think the 0x3300 is used instead of 0x5a00 when u do an xor to the register. some suggestions. did u try to short Vcc w/ the RESET pin to start the firmware? i.e. your NMI will not be configured if the code never reaches there, and u need RESET tie to high when u attach power to get your 1st line of code going. are u connecting your tactile button between RESET and GND? or should it be RESET and Vcc? [EDIT] ps. i did not try the code, just read it and blind guess Quote Link to post Share on other sites
simpleavr 399 Posted November 18, 2010 Share Posted November 18, 2010 some more suggestions Please note that because nRST/NMI pin is also the SBWTDIO pin. Thus you should not press this push-button while you are using SBW. should u remove the two jumpers (RST/SBWCLK) on the 5 jumper block? they may interfere. and your had jumper on your led? teoah 1 Quote Link to post Share on other sites
teoah 0 Posted November 18, 2010 Author Share Posted November 18, 2010 Yup! That was the problem. I removed the RST jumper and it works fine now. Thanks! Edit: Actually I was wrong. The jumper isn't what makes the difference between working and not working. What makes the difference is whether or not you're debugging it or not. It only seems to work when you're not in debugging mode. Quote Link to post Share on other sites
GeekDoc 226 Posted November 18, 2010 Share Posted November 18, 2010 Edit: Actually I was wrong. The jumper isn't what makes the difference between working and not working.What makes the difference is whether or not you're debugging it or not. It only seems to work when you're not in debugging mode. Makes sense... The debugger requires access to the RST pin. So, I guess we can get an extra pin, but we can't debug to make sure it works. Quote Link to post Share on other sites
teoah 0 Posted November 18, 2010 Author Share Posted November 18, 2010 Ah, I see. Is there a way to turn this off? Quote Link to post Share on other sites
gatesphere 45 Posted November 18, 2010 Share Posted November 18, 2010 Ah, I see. Is there a way to turn this off? Not as far as I know. The RST pin is required for debugging, and debug mode is automatically started when you program with CCS. Quote Link to post Share on other sites
OCY 19 Posted November 19, 2010 Share Posted November 19, 2010 Sorry, I did not catch the conversation earlier and did not make my "Note" very clear. But you guy already figured it out. Yes, the Launchpat uses SBW for Debugging. Thus the button on the nRST/NMI pin cannot be used during that. If you use other "4-wire JTAG" for Debugging, that button can be used while you are debugging. (No, do not rush out to buy a 4-wire JTAG tool just for this.) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.