Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MPLab 8.92 Keeps Crashing

Status
Not open for further replies.

jpanhalt

Well-Known Member
Most Helpful Member
In the past, I have had problems with MPLab/MPLab SIM occasionally freezing, but that was infrequent and was usually related to not doing anything on it for half an hour or more. When it froze, it did not actually crash -- just took awhile to wake up.

In the past 2 days, MPLab crashes frequently during debugging and is almost unusable. The crashes occur usually when I select "Run", but occasionally when I am stepping quickly through a routine. It has not crashed when I single step through the very same code. The program compiles without error and includes several well-used subroutines. The main difference compared to other programs I have debugged is that I am using Register Injection, and that list has about 12 hex values.

PC = Intel, about 2 years old
C drive = SanDish SSD
MPLab = 8.92
Language = MPASM
Chip = 12F683

This MPLab install has been used for a little more than a year. It was re-installed after a previous SSD died. No other problems to date, until yesterday when I started using the register inject for a project.

Here is the the error message:

upload_2015-11-6_16-33-32.png


Any similar experiences or comments on the crash report? What caught my eye was the StackHash.

John
 
No problems here!! I've always enjoyed trouble free MPLAB.. I use 8.92 at home..( I think 8,86 at work)

The only glitch I ever encountered was XC8 froze a couple of times, but that wasn't an MPLAB thing, purely a XC8 linker thing!!
 
I searched on: MPLab crashes with register injection
Got some interesting hits. Here are just 2 of them:
https://www.microchip.com/forums/m248920.aspx


The frustrating part is that the register injection seems to go smoothly and everything works when single stepping through the program. But, my program has some delays in it (several 2 msec and numerous 104 usec (baud 9600 transmit) delays. It is beyond tedious to do those delays single step. Of course, I can use "unlimited" breakpoints to go quickly through the delays or comment them out, I am just wondering whether there is an easier solution, such as , "keep your stack to less than 8 entries" or such.

The reason the register injection is so long (it should be 16) is that I am testing an optical-encoder decoder scheme and wanted to test all possibilities.

John
 
Here is the stimulus file I entered (.txt) and the .sbs interpretation by MPLab. Not sure it helps, but that is what I have.

John

Addendum: Since I just got the encoder (Bourns bottom of the line, no switch, no index) yesterday afternoon, I was curious how fast I could turn it. It gives 64 pulses per revolution. The fastest I could turn it was 1 ms per pulse. A more typical rapid speed was 8 to 10 ms per pulse. I had guessed that my "accelerated" speed would be around 2 ms per pulse, so those results are not too far off. Don't have Mr AI's bionic wrist. Anyway, I will definitely have to increase the print speed to my LCD display or have a nice buffer. The algorithm I am using requires sampling at least once per pulse.
 

Attachments

  • GPIO Injection.txt
    38 bytes · Views: 241
  • Optical Encoder Stimulus.sbs.txt
    389 bytes · Views: 219
Last edited:
TENTATIVELY SOLVED

More information. The breakpoints get screwed up when it freezes.
Here are breakpoints before a freeze and after compiling:
Before freeze_Capture.PNG


After a freeze, restarting MPLab and loading the program shows these breakpoints:

After freeze_Capture.PNG


Obviously, they moved. And of course, the one at "Debug" won't work. The program runs fine to the second breakpoint. At that point, I can step through and no problem. But when I try to run from #2 to #3 breakpoint, the program crashes. "Call BTD255" is a well used routine to convert binary to decimal and includes a 9600 baud software serial transmit. Both routines have been used many times alone and together. The transmit routine includes these steps:
upload_2015-11-6_19-32-9.png


I think the problem is related to the two reads of GPIO in that routine. Those reads are seen by the simulator as calls for register injection from my list, which may be what is screwing it up. I edited out the Put232 subroutine (serial transmit) and left the BTD255. Simulates fine with that change. So, tentatively, those GPIO reads in the serial transmit seem to be the problem.

I'll play with it more tomorrow to pin it down. As so often is the case, "strange" problems are only strange to us humans. The software is doing exactly what we told it to do. Now, if only MPLab would allow injection to a pin instead to a register, this problem would not have occurred. I'll leave the images as inserted, as the solution evolved while writing this update. Maybe they will help someone else.

John
 
UPDATE:
Problem identified last night was verified. Got entire program to simulate using a clock stimulus with staggered starts on the two encoder inputs to represent a +1. Unfortunately, my real encoder died an early death. It is being replaced by the vendor, so I will need to wait a few days to repeat test in real life.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top