Hi, >> Attaching a scope to the interrupt line, watching the last interrupts
>> before the driver stops working, one can see up to three interrupts for >> each packet. The first one is the RX_START interrupt, 500us after this >> the AMI (Adress Match Indication) interrupt is generated and only about >> 25us after this interrupt is handled (interrupt line goes down) the >> TRX_END interrupt follows. If the driver miss this interrupt the rf230 >> doesn't reset its interrupt line and the driver can't detect any new >> interrupt. (http://defekt.int.nvbi.de/sascha/rf230_stale_irq.JPG) > > Can you set the at86rf230 to only interrupt with TRX_END? Isn't that > the one you really want? Yes, the rf230 allows to filter the interrupt sources and I think this should be done, since TRX_END is the only one which is currently handled by the irq worker (maybe some other should be handled too). But I think that alone wouldn't solve the problem, since with some load this could also happen with only the TRX_END interrupt enabled, when the radio receives two packets in a short time frame (for example an ACK packet). >> For my setup I was able to resolve this problem by completely removing >> the disabling / enabling of the interrupt in the driver. As far as I can >> see it, disabling the interrupt doesn't make any sense for edge >> triggered interrupts. Are there any platforms, that will retrigger the >> interrupt, while the interrupt line is high, so that it is necessary to >> disable the interrupt while handling it? Or was the assumption, that the >> rf230 would automatically reset its interrupt line? > > I guess the point is to not try to access the device while the reading > of the data is being done. I'm not sure this is necessary though, for > two reasons. 1: SPI messages (spi_sync()) execute atomically with > respect to each other, and 2: all the SPI is done from a workqueue > anyway, which is serialized. I didn't looked very deep into it, but as far as I understand it at the moment, only the access to the frame buffer of the rf230 needs to be serialized beyond the point you mentioned above. This is already done by the driver by using lp->irq_disabled to lockout at86rf230_xmit() while it receives a packet from the radio. Besides at86rf230_rx() and at86rf230_xmit() no other function uses the frame buffer. > > Dmitry, Alexander, do you have any insight into this? > > Alan. > >> At the moment I am not sure what would be the right solution here. I >> think removing the calls to disable / enable the irq would do the trick, >> but I don't know if it breaks some other setups :( > Regards Sascha ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel