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.

Software Analysis

Status
Not open for further replies.
I wanted to measure the time the program executes the various interrupts and the loading of the interrupts on the main program, specifically CAN related. Are there any tools to do the same? If specific tools are not available what are the different methods to do the same? I am facing issue of watch dog timer reset and i am not sure which part of the code does this? I am suspecting CAN RX and TX interrupt. Please help.
 
Hi,

These questions could be more productively addressed, if you would tell us which processor you are using.

If you don't want the watch dog timer, can you disable it? With PIC's that is easily done.

As for timing processor events, that can be done with the Microchip simulator. I suspect all development packages allow that. You can also do it in your program. I have a utility, PrintRegister. I can effectively start a timer, then stop the program where needed and print the timer's content to an LCD. Obviously , using the development package for your processor is usually easier.

John
 
Set a pin high at the beginning of ISR, and set it low at the end. Use different pins for different ISRs. Analyze the pins with logic analyzer.
 
I forgot to mention NorthGuy's method. So silly of me... I am currently doing that using my oscilloscope to monitor the pin that I alternately set high or low.
John
 
Along those same lines, I like to add a debug/status port on my board. So at different points in the program I can boink some LED's with a value. I did that because I have not quite figured out how to use my debugger software yet.
 
Just for giggles, which Freescale controller are you using? They make quite a few.
 
It is s12x family. I think the most difficult issue i am facing till date. Some unknown can message with extended identifier followed by two standard identifier messages in which one is not at all can message occurs (but shown as standard message in bus master which is wrong), then my system resets. The other difficult part is it happens randomly. I have never seen myself but trying to reproduce It. Any ideas. Should I look only Can driver layer or some other application may also cause it?
 
It was not that I did not believe you, but I found it hard to believe that your MCU would not provide a means to disable the watchdog function as this would just be a silly way to design a part. After all the development stage is not the time you want your MCU going into reset. Well to make it quick, I looked up your data sheet and found that you gave us some information that was not entirely correct concerning the WDOG disable.

The following tables were found on page 115 of the ST12X data sheet. From what I can tell, you should set CR0-2 to [000]. I think that should work.

freescalewatchdog1.PNG


freescalewatchdog.PNG
 
Sorry I could not communicate properly to you. It is not that we could not disable the watch dog timer. In the production it is not accepted or not recommended to disable watchdog, so I have to enable watchdog.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top