External interrupts from TV cards...

This forum is for general developer support questions.
Post Reply
Spirantho
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Thu Jan 26, 2012 10:54 am

External interrupts from TV cards...

Post by Spirantho »

Hi everybody,
First post here - be gentle. :)

Every now and again I have another hack at my TV cards on AOS 4.

Now, I can get them working fine without interrupts, but they really need interrupts to work at full efficiency. No matter what I try, they're not reliable. This is what happens:

A1XE:
Bt8x8 chipset: Enabling interrupts works for a while. Usually if anything at all untoward happens, the entire system locks solid (no Sashimi output).
Cx2388x chipset: Interrupt adds but never triggers.

SAM440ep:
Bt8x8: N/A (5V card)
Cx2388x: Interrupt (number 66) adds but never triggers.

Pegasos II G3:
Bt8x8: Enabling interrupts crashes machine solid immediately.
Cx2388x: Adding interrupt (number 66) fails (return code 0).

In other words, they basically don't work, except occasionally on the Bt8x8 on the A1, which makes me think my code is ok.

Are there caveats I should be aware of? Is there something that can just lock up the entire system like this? Why does my Peg II now add the interrupt?

Any help would be gratefully received!
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: External interrupts from TV cards...

Post by ssolie »

I have heard about problems with interrupts going missing on the Eyetech boards so that is not a real surprise. I think the 'standard' fix was to sprinkle your driver with eieio instructions but I'm no expert on this area.

The Sam and Peg II boards should have everything working so that is rather concerning.

I think what would be best is if you could supply some simple test code for the Sam and Peg II systems which we can attach to a bug report.

P.S. I moved your topic to this section.
ExecSG Team Lead
Spirantho
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Thu Jan 26, 2012 10:54 am

Re: External interrupts from TV cards...

Post by Spirantho »

Ah, yes, didn't notice this forum first time around.

Here's my interrupt routine at the moment:

Code: Select all

ULONG Interrupt_Handler(struct ExceptionContext *Context, struct ExecBase *SysBase,
                       APTR userData)
{
	return 1;  
}
Not too much to go wrong there. I tried it with return 0; as well.

Here's where I create the interrupt:

Code: Select all

    mCard->mInterruptNumber = mCard->mPCIDevice->MapInterrupt();

	IExec->DebugPrintF( "Interrupt mapped to %d.\n", mCard->mInterruptNumber);

	mInterrupt = (struct Interrupt *)IExec->AllocSysObjectTags( ASOT_INTERRUPT,
					ASOINTR_Size,  sizeof( struct Interrupt ),
					ASOINTR_Code,  Interrupt_Handler/*(APTR)handler*/,
					ASOINTR_Data,  mCard,
					TAG_END
					);
	mInterrupt->is_Node.ln_Succ = 0;
    mInterrupt->is_Node.ln_Pred = 0;
	mInterrupt->is_Node.ln_Name = (char *)"AmiTV Interrupt Handler";
	mInterrupt->is_Node.ln_Pri = -1;
	mInterrupt->is_Node.ln_Type = NT_EXTINTERRUPT;
    tIntSuccess = IExec->AddIntServer( mCard->mInterruptNumber, mInterrupt );
tIntSuccess is always non-zero except the Cx2388x chipset on the PegII.

Am I missing something obvious? There's very little documentation on interrupts around, probably because the only people usually working on hardware devices are the devs themselves!
Post Reply