FDC driver irq fires

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Zioo

Re:FDC driver irq fires

Post by Zioo »

Do I have to have a

fdc_sendbyte(0x08); //send sense interrupt

in my fdc handler ?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:FDC driver irq fires

Post by Pype.Clicker »

might be a good idea ... and iirc, you have to sense interrupt 4 times after a reset. Don't take my words for it: check the programming guidelines at the end of the datasheet (i mentionned the URL above, didn't i ?)
Zioo

Re:FDC driver irq fires

Post by Zioo »

Now i'm back again...

I fixed a bug so now is all the other irqs not stopping when i try to initalize the fdc driver... And if I run the reset function to times the irq handler is also called 2 times. But if I run the recalibrate function the fdc handler isn't called..

A bit of code... May you need more ?

Code: Select all

void fdc_handler()
{
    fd_flag = 1;
    fdc_send(0x08);
    puts("FDC!");
}

void fdc_recalibrate()
{
   puts("recalibrate\n");
   fdc_send(0x07);
   fdc_send(0);
   fdc_wait_for_irq();
}
Post Reply