This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IAR does not give control during debug

Other Parts Discussed in Thread: MSP430F5437A, MSP-FET

Hi,

I am facing a weird issue where after downloading the code, IAR in debug mode, won't give me option to run. I am using MSP430F5437A micro-controller. Please see the attached image below. 

I suspect that the MSP-FET that is used to download the program to micro has less RAM size hence is not able to download the code and give the control in debugger.

Kindly let me know the exact reason and the way to resolve the issue.

Thanks

Akshay

  • From the memory size you stay within the limits of the MSP430F5437A. It has 256k flash and 16k of RAM.
  • I believe I am within the limits of the controller and that either IAR or the ICD is not letting me debug the code if the RAM size exceeds above 4248bytes.

  • One theory is that the watchdog timer triggers while the memory initialization is being performed.

    If this is the case, you can implement a __low_level_init() function to your application, disabling the watchdog. (The __low_level_init() function is called before variables are initialized.) One way to do this is:

    #include <intrinsics.h>
    
    int __low_level_init(void)
    {
      WDTCTL = WDTPW+WDTHOLD;
      return 1;
    }
    

    If this doesn't help, try to uncheck "run to main", this way the debugger doesn't run the initalization code. This should give you full debug control.

  • Thanks a lot Anders for the solution. It worked.

    But I am facing another issue that if I power off my device and again power it up then it won't work. Every time I need to go to debug mode to make my device run.

    Also, when I build my project in Release mode and download it using standalone flash programmer rather than IAR, then also it won't work.

    Can you please suggest any solution on this?

    Regards

    Akshay

  • AKSHAY PADEGAONKAR said:

    Thanks a lot Anders for the solution. It worked.

    Great to hear!

    AKSHAY PADEGAONKAR said:

    But I am facing another issue that if I power off my device and again power it up then it won't work. Every time I need to go to debug mode to make my device run.

    Also, when I build my project in Release mode and download it using standalone flash programmer rather than IAR, then also it won't work.

    Can you please suggest any solution on this?

    Unfortunately, I can't help you with this one, but I'm sure others here can. (I have limited experience with real-world debugger issues since I spend my time developing the compiler.)

        -- Anders Lindgren, IAR Systems

**Attention** This is a public forum