More XGATE frustration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

More XGATE frustration

1,164 Views
roberthiebert
Senior Contributor I

MC9S12XEP100, Code Warrior, relocatable assembler.

In my continued struggle to get XGATE to handle some interrupts with an existing program I have, I have written some short test programs to help me with this. In my latest one I have come up against a brick wall (again). I have a test program that works. It uses a periodic interrupt timer to generate a 20ms square wave signal to ECT Ch0 input capture. All the input capture does for now is to increment a variable. Both the PIT and ECT ISRs use XGATE, and they work just fine.

In my latest program, instead of using the PIT and XGATE to generate the signal, I am using RTI with the CPU. This portion of the program works as designed, but I can't seem to get it to enter the ECT ISR in XGATE. I've spent a lot of time trying to troubleshoot this but I can't find what it is that I am doin wrong. Time to beg for help.

If anyone could find the time to have a look at my program and make a suggestion I'd really appreciate it.

Regards,

Robert

0 Kudos
Reply
2 Replies

1,099 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

I was fighting with it longer than acceptable so I created my own project where port B is connected to the ECT Ch0 IC function.

(Two days I spent with wrong multilink cable ... frustrating to find hidden and random behavior issue)

I am able to get into the interrupt. The code is very simple so now there is a game "find ten differences" :). I hope you will be successful than me. However, I have not checked your code after my started to run. Probably, with following suggestion it will also run. Additionally I set a pull down on ECT Ch0 (rising edge detection).

But !!!! one big issue (I forget because I usually used XGATE in flash) can be usage of RAM for XGATE. If you set breakpoint to it before the XGATE is initialized a copied then how it could now where it is?

Suggestion...set breakpoint at CPU somewhere after XGATE setup is done and code is copied. After the code stops at this brkpnt you can set another one in the XGATE window.

Another approach  is to run the code, temporarily stop it, and then set a breakpoint into XGATE code.

 

Best regards,

Ladislav

 

0 Kudos
Reply

1,079 Views
roberthiebert
Senior Contributor I

Hi Ladislav,

Thanks so much for your efforts. I too have been fighting with this for far more time than I consider acceptable. I went through your code and don't see anything different about it that I am doing , other than I am using RTI to generate the signal. There is something hidden here that I cannot find, so I'm going to attack the problem from another angle.

This was just a test code to see if certain code portions would work, so it is not critical, (but I hate to give up on it). I have had some success in converting my project code from absolute to relocatable assembler. It uses the CPU to handle all interrupts. Now I will try and redirect them one by one to XGATE. Maybe this will work for me.

Regards,

Robert 

0 Kudos
Reply