Marc Kleine-Budde wrote: > Kurt Van Dijck wrote: >> I planned to do just a 'proof of concept'. Like, the PCA82c251 has a slope >> control resistor, that I don't know the exact formula is, but that resistor >> controls the maximum baudrate. I was just making space to implement the >> formula. >> To extend the concept, I'm working on a tja1041 too, altough I never >> used this one before. >> What I want to know from this tja1041 or similar is: What pins are usually >> connected to the cpu, what pins are usually not, and what pins are >> sometimes connected. This allows me to provide a 'minimum required' set >> of gpio the transceiver driver needs. >> >> I _assume_ the wake pin is mostly not connected to the cpu, but direct >> into the power circuitry. What can a linux driver do with the wake pin? > > it can generate an interrupt that wakes up the whole linux system from > suspend to ram. Imagine a fast booting concept in the automotive > environment.
Yep. The 'wake' pin is some kind of additional input to wake the system not only by detecting CAN traffic. E.g. you could attach a RTC or something else here ... Please check the schematic on page "15 of 26" from http://www.nxp.com/acrobat/datasheets/TJA1041_6.pdf This is the common application for fault tolerant transceivers that support the sleep modes. You need to set EN and /STB in order to set the transceiver into the sleep mode - see table 4 in chapter 7.1. Usually EN and /STB are both set to 1 (or open collector) and when you want to go to sleep, you need to perform the steps 1. Set /STB and EN to 1 (default) 2. Set /STB to 0 and EN to 1 3. Set /STB and EN to 0 And then the INH line switches to off and kills your power supply :-) Our system makes a usleep(500000) (to wait for power loss) and then executes a system reset, e.g. when CAN traffic just re-appeared and the INH line did no do it's job. So for the TJA1041 we would need: EN, /STB and /ERR to be connected to the CPU via GPIO. A real goodie would be to connect /ERR to an interrupt line that also detects state changes - but this is not really needed. I'll take a look on other 'intelligent' transceivers, if there are any requirements that exceed the described TJA1041 / TJA1054 needs. Regards, Oliver _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
