On 06/21/2018 03:20 PM, Wolfgang Grandegger wrote: > Hello Joe, > > Am 21.06.2018 um 15:04 schrieb Joe Burmeister: >> Hi Wolfgang, >> >> >> On 21/06/18 13:59, Wolfgang Grandegger wrote: >> >> <snip> >> >>> Looking to the code, I see a problem with reading the status register >>> (C_CAN_STS_REG). It should *only* be read if bit 15 of the interrupt >>> status register (C_CAN_INT_REG) is set/pending. According to the manual, >>> reading the status register will also clear the bit in C_CAN_INT_REG. >>> This could explain lost (bus-off) status interrupts and also the strange >>> messages I mentioned above. >>> >>> Wolfgang. >> >> It sounds plausible. I can try it. Have you got a good datasheet for D_Can ? > > I have attached my (untested) patch. TXOK and RXOK is still handled > unconditionally, but that's maybe less critical. Has someone tested this patch? Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature