Go to advanced search

by Romey-Rome
Sat Apr 25, 2015 10:49 pm
Forum: C/C++
Topic: bcm2835 lib + SPI + manual CS
Replies: 5
Views: 835

Re: bcm2835 lib + SPI + manual CS

Thanks guys.
I don't intend to manually CS for data. Just the reset. Also, the 2 & 6 are minumums, so if it's longer, it's OK.
by Romey-Rome
Sat Apr 25, 2015 10:56 am
Forum: C/C++
Topic: bcm2835 lib + SPI + manual CS
Replies: 5
Views: 835

bcm2835 lib + SPI + manual CS

Hello.

I need to send my device a reset frame - Pull CS low for 2 clock cycles, release, and wait 6 cycles.

In bus pirate I would do

Code: Select all

[&&]&&&&&&[<cmd> <data>]
Trying to move to C...

How can I accomplish this? All the functions seem to want to control CS for you.

Thanks!
by Romey-Rome
Fri Apr 17, 2015 1:06 am
Forum: Troubleshooting
Topic: module spi-dev
Replies: 7
Views: 1031

Re: module spi-dev

Hello -

So how do you permanently increase the buffer size with spi-bcm2708? I don't see it having any parameters.
by Romey-Rome
Sun Mar 29, 2015 1:24 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

Well I got rid of can0 hot-plug by setting hotplug from "any" to "eth0" can0 just goes to "can state BUS-OFF" now after the errors. Back up after ifconfig can0 down/up. What effect does oscillator=16000000 have on anything? No matter what I set it to, clock always shows 8000000. I figured with oscil...
by Romey-Rome
Sat Mar 28, 2015 11:42 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

Well..something else now. http://i.imgur.com/N7C6cYy.png http://i.imgur.com/N7C6cYy.png I have 2 Pis with a CAN on each. Both terminated with an R120. Left in PiA, right is PiB. Numbers are the order I executed the commands in. Top ones are dumps, bottom are the sends. Nothing sent from B ever shows...
by Romey-Rome
Sat Mar 28, 2015 1:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

Also it is important that the clock of the mcp2515 is running correctly! Without a connected clock/crystal the mcp2515 will not respond on SPI and return 0x00 (or 0xff if you have added a pullup to MISO)... So you may want to check that as well! Martin Yeey. New build works. Same schematic. I must ...
by Romey-Rome
Fri Mar 27, 2015 11:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

Well. This one works, so must be my build.

http://www.ebay.com/itm/301524675333?_t ... EBIDX%3AIT
by Romey-Rome
Fri Mar 27, 2015 5:09 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

I have just checked - for me MISO/MOSI are typically low, so there must be something pulling it high on your end to result in 0xff to get read - especially if that ONLY happens with CS0 (=default) but you are reading 0x00 for CS1 (=argument 7)... I just tried this on a brand new pi2 & a clean build...
by Romey-Rome
Mon Mar 23, 2015 7:37 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

I get 255/0xff running it without any arguments, and 0/0x00 with the 7 arg. This is the same with or without the CAN board and GPIO7+GPIO9 shorted.
by Romey-Rome
Mon Mar 23, 2015 2:12 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

I checked continuity of all the needed mcp2515 pins, and they all go to the right GPIO pins. Unfortunately I don't have an oscilloscope to do any real testing. Maybe I fried the IC . I just looked @ the MCP data-sheet for the max soldering temps, and I may (read: definitely) have gone too hot with t...
by Romey-Rome
Sun Mar 22, 2015 10:50 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

Yeah. I get: Resetting MCP2515 RESET 0 0x00 Read MCP2515 registers CMD-READ 0 0x00 REG-CNF3 0 0x00 CNF3 0 0x00 CNF2 0 0x00 CNF1 0 0x00 INTE 0 0x00 INTF 0 0x00 EFLG 0 0x00 CANSTAT 0 0x00 CANCTRL 0 0x00 Last 2 are different. Maybe it is the HW. I have parts on order to build another one. We'll see. If...
by Romey-Rome
Sun Mar 22, 2015 7:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

root@raspberrypi:~# head /sys/bus/spi/devices/spi*/modalias ==> /sys/bus/spi/devices/spi0.0/modalias <== spi:mcp2515 ==> /sys/bus/spi/devices/spi0.1/modalias <== spi:spidev root@raspberrypi:~# vcdbg log msg 000695.394: HDMI:EDID error reading EDID block 0 attempt 0 000696.657: HDMI:EDID error readi...
by Romey-Rome
Sun Mar 22, 2015 10:50 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 814
Views: 346925

Re: CAN controller

I can't get this design to work for nothin' http://hackaday.io/project/346-canpi on Pi2. Using the "new" overlay method. This is my first run at it, so I have no previous working version for refference. Schematic: http://i.imgur.com/w5nqjE0.png lsmod: root@raspberrypi:~# lsmod Module Size Used by bn...

Go to advanced search