On Fri, Nov 6, 2009 at 6:10 AM, Paul Thomas <[email protected]> wrote:

> OK, I think I know some of the problem. First when I look at the debug
> output after running the ifconfig up I get useful output:
> mcp251x spi1.3: MCP251x didn't wake-up
> mcp251x spi1.3: bit-timing not yet defined
> mcp251x spi1.3: unable to set initial baudrate!
>

Yes, this looks like the irq is missing.

> When I see this message I don't get any activity on DO, but during
> startup there is activity on DO during the probe. So it looks like
> it's just not coming out of sleep. On this board the only connections

yes, if it says probed it's very likely that DO,DI,SCK,CS are wired correctly.

> to the host processor are the 4 SPI pins and INT (pin 12 on 18 pin
> version), but the irq pin (INT) isn't even defined. Do I need some
> other connection for the driver? Tomorrow I'll try and not put the
> part to sleep and see if that works.

no, it won't work: no interrupt no party. If you check with the
oscilloscope you will see a falling edge when mcp251x confirmed the
out of sleep.

You need to connect the interrupt line for sure (the one called INT
negated). When you have done that add the interrupt line in the
platform data in the mach file, something like:

static struct spi_board_info spi_board_info[] = {
....
        /* CAN */
        {
                .modalias       = "mcp251x",
                .platform_data  = &mcp251x_info,
                .irq            = IRQ_EINT13,   /* <----- TODO */
                .max_speed_hz   = 2*1000*1000,
                .chip_select    = 0, /* GPJ2 */
        }
-------
}
.......
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
........

HTH,
Bye!

-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to