cancel
Showing results for 
Search instead for 
Did you mean: 

DEBUG or not DEBUG... EMI is not working.

markmcwired9
Associate II
Posted on January 12, 2007 at 09:36

DEBUG or not DEBUG... EMI is not working.

2 REPLIES 2
markmcwired9
Associate II
Posted on May 17, 2011 at 09:35

Hello everyone!!

I have an IAR STR912-SK with J-Link and I’m trying to use the EMI in multiplexed mode, 16-bit Data, 18-bit Address, CS0, wait states >=10 for all. I used CAPS for generating the pin assignment. And I read every post in this forum related to EMI, accepting all the given recommendations, like enabling both __EMI and __EMI_MEM_CLK in the clock gating control 0 register. I also add this line of code:

GPIO_EMIConfig( ENABLE ); which was not generated by CAPS.

I connected two latches for the address bus and made counter with a big delay so I can see that the address lines work fine. I placed leds at the address lines:

while(1)

{

fvar = 0;

*(u16*)(0x3C000000 + i) = (u16)i;

while(fvar < 10000)

fvar++;

i++;

if(i>0xffff) i = 0;

}

But, the only lines doing the right sequence are P9.0~P9.3. Port8 is weird (strange sequence), but repetitive. P9.4~P9.7 count ok but the leds blink randomly. It isn’t a hardware problem, because I checked this by hand.

I placed comment bars before the debug(); sentence. I don’t know if that is enough to disable this directive and if that is causing the strange behavior, but even after that, the sequence is not normal.

My simple … simple question is: How can I generate a code (with EWARM in this case) with DEBUG disable so I can download it to the processor using a tool like the JTag Programmer. I want to try this to be sure that the debugger is not the problem.

Thanks to all.

markmcwired9
Associate II
Posted on May 17, 2011 at 09:35

I found a way to make this work. It's either a turnaround or a mess 🙂

1) I make and debug the project with the debug() statement available

2) then, I write comment bars '//' before the debug() statemet and hit make and debug again.

Now the EMI works fine.

Does anyone knows what is actually happening, and what should be the right way to do this..?

McWired