Interrupts

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

Interrupts

4,781 Views
Dietrich
Contributor II
This message contains an entire topic ported from the WildRice - Coldfire forum.  Freescale has received the approval from the WildRice administrator on seeding the Freescale forum with messages.  The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value as you search for answers to your questions.  Freescale assumes no responsibility whatsoever with respect to Posted Material.  For additional information, please see the Terms of Use - Message Boards and Community Forums.  Thank You and Enjoy the Forum!


Oct 8, 2005, 8:16 PM

Post #1 of 4 (74 views)
Copy Shortcut
[ColdFire] Interrupts Can't Post

--------------------------------------------------------------------------------

Hello,

I'm having a hard time getting edge port interrupts to work as expected on my 5282. I can't get any edge port interrupt other than #7 to work.

I start with the degug firmwear. On my EVB, edge port #7 is used as "abort" (displaying registers and PC and performing disassembly of current instruction). I verified that this is functioning properly and I can modify it, so I know where this stuff lives in the debug source.

Now I try to turn on the other edge port interrupts.

First, I enable all other edge port interrupts for all of the pins in the EPORT module (EPIER = 0xFE). I leave the EPORT pin assignment register set to level sensitive (falling edge triggered and level sensitive both work equally well for me as the eport pins have external pullups).

Second, I unmask (what I believe are) the interrupt mask bits for the edge port pins (IMRL0 = 0xFFFFFFF0).

When I look at the interrupt handler in the debug source, I find a very large switch statement. The switch statement appears to take the vector and respond accordingly. All of the predefined exception vector handlers can be found here (Illegal Instruction, Divide By Zero, etc). The handler that deals with the /irq7 "abort" pin is found under the "default:" case statment as shown below:

case 60:
case 61:
case 62:
case 63:
printf("Reserved: #%d\n",
MCF5XXX_RD_SF_VECTOR(framep));
cpu_reg_display(NULL);
cpu_disasm(context.pc,TRUE);
break;
default:
// Handle User Defined interrupts 64-255
printf("here\n");
cpu_handle_interrupt(MCF5XXX_RD_SF_VECTOR(framep));
cpu_reg_display(NULL);
cpu_disasm(context.pc,TRUE);
break;

Any vector generated from an edge port interrupt should be handled by the default case statement. The result I'm seeing is that any attempt to trigger an interrupt thru /irq pins 1-6 has absolutely no effect. I have tryed other interrupt handlers from other sample source code packages and the effect is the same. What am I doing wrong???

Any suggestions are greatly appreciated.


Thanks,
Aaron Shepard

Oct 11, 2005, 12:44 PM

Post #2 of 4 (71 views)
Copy Shortcut
Re: [ColdFire] Interrupts [In reply to] Can't Post

--------------------------------------------------------------------------------

Mr. Shepard

I have not worked with that processor. However, I have worked with a few
different other coldfire processors. On these coldfires I have worked
with, there were bits in the CPU's status register that are designated
as the interrupt mask level. This mask level is the mechanism that
facilitates interrupt priorites. If that edge port #7 happens to be
higher priority than the edge ports that do not work, then maybe the
interrupt mask level is set (initialized) to high, effectively masking
out the lower priority interrupts.

Bryan Brooks
Beck Automation



a_shepard wrote:

> Hello,
>
> I'm having a hard time getting edge port interrupts to work as
> expected on my 5282. I can't get any edge port interrupt other than
> #7 to work.
>
> I start with the degug firmwear. On my EVB, edge port #7 is used as
> "abort" (displaying registers and PC and performing disassembly of
> current instruction). I verified that this is functioning properly
> and I can modify it, so I know where this stuff lives in the debug source.
>
> Now I try to turn on the other edge port interrupts.
>
> First, I enable all other edge port interrupts for all of the pins in
> the EPORT module (EPIER = 0xFE). I leave the EPORT pin assignment
> register set to level sensitive (falling edge triggered and level
> sensitive both work equally well for me as the eport pins have
> external pullups).
>
> Second, I unmask (what I believe are) the interrupt mask bits for the
> edge port pins (IMRL0 = 0xFFFFFFF0).
>
> When I look at the interrupt handler in the debug source, I find a
> very large switch statement. The switch statement appears to take the
> vector and respond accordingly. All of the predefined exception
> vector handlers can be found here (Illegal Instruction, Divide By
> Zero, etc). The handler that deals with the /irq7 "abort" pin is
> found under the "default:" case statment as shown below:
>
> case 60:
> case 61:
> case 62:
> case 63:
> printf("Reserved: #%d\n",
> MCF5XXX_RD_SF_VECTOR(framep));
> cpu_reg_display(NULL);
> cpu_disasm(context.pc,TRUE);
> break;
> default:
> // Handle User Defined interrupts 64-255
> printf("here\n");
> cpu_handle_interrupt(MCF5XXX_RD_SF_VECTOR(framep));
> cpu_reg_display(NULL);
> cpu_disasm(context.pc,TRUE);
> break;
> Any vector generated from an edge port interrupt should be handled by
> the default case statement. The result I'm seeing is that any attempt
> to trigger an interrupt thru /irq pins 1-6 has absolutely no effect.
> I have tryed other interrupt handlers from other sample source code
> packages and the effect is the same. What am I doing wrong???
>
> Any suggestions are greatly appreciated.
>
>
> Thanks,
> Aaron Shepard
>


Oct 12, 2005, 8:16 AM

Post #3 of 4 (67 views)
Copy Shortcut
RE: [ColdFire] Interrupts [In reply to] Can't Post

--------------------------------------------------------------------------------

Hello Bryan,

Thanks for the tip, I was able to get interrupts on the other edge ports by
changing the mask level in the status register.


Aaron Shepard


--------------------------------------------------------------------
Mar 7, 2006, 11:03 AM

Post #4 of 4 (24 views)
Copy Shortcut
Re: [Listserv] Interrupts [In reply to] Can't Post

--------------------------------------------------------------------------------

Hello Bryan,

Could you give some tips to find the place where to change the value of status register. I am using ucLinux 2.4.xx and need to use IRQ4.

Regards,
Jewel

Message Edited by Dietrich on 04-01-2006 11:22 AM

Message Edited by Dietrich on 04-01-2006 11:24 AM

Message Edited by Dietrich on 04-04-2006 09:20 PM

Labels (1)
0 Kudos
0 Replies