Benjamin Suljic wrote: > Hi, > > I am using GPIO interrupts in my battery driver in this way: > > > // REGISTER INTERRUP __REG(DAVINCI_PINMUX0) &= ~(1<<26); __REG(BINTEN) |= 1; > // enable zero bank GPI0_0-GPIO_15 __REG(SET_RIS_TRIG01) |= 16; //set GPIO4 > to rising edge triger __REG(SET_FAL_TRIG01) |= 8; //set GPIO3 to falling > edge trigger __REG(SET_RIS_TRIG01) |= 8; //set GPIO3 to rising edge trigger > > Regards, > Benjamin > > > Winston Ma <[EMAIL PROTECTED]> wrote: Hi All, > > I am now having problem interfacing GPIO interrupt on DM6446. > > When I tried to set GPIO0 rising edge interrupt. It's falling edge is > activated as well. Therefore it's double counted. So I wonder what is the > correct way to set an interrupt? > > Here is my step > 1. Set the BITEN to 1 > 2. Set the SET_RIS_TRIG to 1 > > By the way I did the the CLR_FALL_TRIG to 1 but it doesn't work as well. > > Thanks for the help
I've noticed this as well. I looped two gpios together and using u-boot to write the memory addresses, still got interrupts on both edges. I think it's a hardware bug. Here's exactly what I tried. This is what happens when gp50 (output) is connected to gp11 input. U-Boot > mm.l 01c67010 01c67010: ffffffff ? ;gp11 is input 01c67014: 00000000 ? 01c67018: 00000000 ? 01c6701c: 00000000 ? 01c67020: 5ffffcff ? 01c67024: 00000000 ? 01c67028: 00000000 ? 01c6702c: 00000000 ? 01c67030: 00000000 ? 01c67034: 00000000 ? 01c67038: ffffffff ? fffbffff ;gp50 is output U-Boot > mm.l 01c67008 01c67008: 00000000 ? 1f ;enable all banks 01c6700c: 00000000 ? - 01c67008: 0000001f ? U-Boot > mw.l 01c67040 40000 ;gp50 high U-Boot > mm.l 01c67020 01c67020: 5ffffcff ? 01c67024: 00000000 ? 01c67028: 00000000 ? 01c6702c: 00000000 ? 800 ;gp11 set falling int 01c67030: 00000800 ? 01c67034: 00000000 ? q U-Boot > 01c67034: 00000000 ? 01c67038: fffbffff ? q U-Boot > mw.l 01c67044 40000 ;gp50 low U-Boot > mm.l 01c67034 01c67034: 00000800 ? 800 ;gp11 interrupt pending, clear it(correct) 01c67038: fffbffff ? - 01c67034: 00000000 ? q ;interrupt is clear, none pending U-Boot > mw.l 01c67040 40000 ;gp50 high U-Boot > mm.l 01c67034 01c67034: 00000800 ? - ;gp11 interrupt pending(bug!!!!!!) 01c67030: 00000800 ? - ;falling enabled 01c6702c: 00000800 ? - ;falling enabled 01c67028: 00000000 ? - ;rising still disabled 01c67024: 00000000 ? - ;rising still disabled 01c67020: 5ffffcff ? Troy _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
