Hello, SETTE AGOSTINO - technolabs wrote: > Hello, > > > -----Messaggio originale----- > Da: Wolfgang Grandegger [mailto:[email protected]] > Inviato: giovedì 24 settembre 2009 14.49 > A: SETTE AGOSTINO - technolabs > Cc: [email protected] > Oggetto: Re: CC770 and AN82527 > > Hello, > > SETTE AGOSTINO - technolabs wrote: >> Hi All, >> >> I have a card with a Bosch CC770 CAN Controller but I have some >> problems: >> >> 1. I Applied the patch suggested by BOSCH, Ref. CC770 (Stand Alone CAN >> Controller) Data Sheet Revision 1.6 30.03.2009 > > Interesting, could you give me the link to that patch? > [Agostino] I do not have a link up to now, I have only a pdf file named > "13464_Datasheet.pdf" > titled "CC770 (Stand Alone CAN Controller) Data Sheet Revision 1.6 > 20.03.2009"(I made > a mistake before on the date). Concerning the Software patch I had > an old code it seems to work > but in my opinion in not exactly what suggested by Bosch. For this > reason I wrote this e-mail, to > double check with the mailing list if I am right or wrong. Here is > the management of the bus_off error: > > if (status_reg&iSTAT_BOFF) { > flags = can_read_reg(chip, iCTL) & > (iCTL_IE|iCTL_SIE|iCTL_EIE|iCTL_CCE|iCTL_INI); > can_write_reg(chip, flags, iCTL); > > CANMSG("CAN Detecting BusOff - Error count >=256 boff_count %d \n", > chip->canstat.boff_count); > > chip->canstat.boff_count++; > > flags = can_read_reg(chip, iCTL) & > (iCTL_IE|iCTL_SIE|iCTL_EIE|iCTL_CCE|~iCTL_INI); > can_write_reg(chip, flags, iCTL); > }
I just can say that bus-off is working with the Socket-CAN driver I mentioned for the CC770 connected to a MPC8548 processor, IIRC. > There is a Socket-CAN driver for the CC770 or AN82527 in the SVN repository > at BerliOS: > > http://developer.berlios.de/projects/socketcan/ > http://svn.berlios.de/svnroot/repos/socketcan/trunk/kernel/2.6/drivers/net/can/cc770/ > > How is the chip connected to your system (what bus)? > [Agostino] the connection between Microprocessor MPC852 and the Bosch CC770 > CAN controller is > through a parallel non multiplexed interface (8 data and 8 > address). OK, if you are using a recent kernel, e.g. >= 2.6.28, the OF platform driver should work. You can then configure the CC770 via DTS file: c...@3,100 { compatible = "bosch,cc770"; reg = <3 0x100 0x80>; interrupts = <2 0>; interrupt-parent = <&mpic>; bosch,external-clock-frequency = <16000000>; }; Wolfgang. _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
