Go to advanced search

by maddin1234
Tue Feb 11, 2014 5:45 pm
Forum: Troubleshooting
Topic: WLAN disappears after some time
Replies: 19
Views: 26326

Re: WLAN disappears after some time

Hello again, might be it has something to do with the USB power. I tried to use a powered hub and with this it seems to work fine every time. Connected to the Pis USB directly the Edimax makes problems. ifconfig with Edimax directly at Pi wlan0 Link encap:Ethernet Hardware Adresse 80:1f:02:82:a2:bc ...
by maddin1234
Tue Feb 11, 2014 4:41 pm
Forum: Troubleshooting
Topic: WLAN disappears after some time
Replies: 19
Views: 26326

Re: WLAN disappears after some time

Hello, and one more finding. Also with a good Edimax, there is influence between eth0 and wlan0 (normaly there is only wlan0 connected, so this cannot be the cause of my problem) When booting only with wlan0, ping works for wlan ip then connection eth0, ping doesn't work on both interfaces then disc...
by maddin1234
Tue Feb 11, 2014 11:57 am
Forum: Troubleshooting
Topic: WLAN disappears after some time
Replies: 19
Views: 26326

Re: WLAN disappears after some time

Hello, I do not think that it has something to do with the subnet mask. Because lots of them work with this setting and also another Edimax works on exactly this Pi fine. Today I tried iwconfig to look if Powermanagment is off and there I found something strange. After a ping from the Laptop, the Li...
by maddin1234
Tue Feb 11, 2014 7:44 am
Forum: Troubleshooting
Topic: WLAN disappears after some time
Replies: 19
Views: 26326

Re: WLAN disappears after some time

Hello, my /etc/network/interfaces looks like this auto lo iface lo inet loopback iface eth0 inet static address 192.168.0.1 netmask 255.255.0.0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.0.101 netmask 255.255.0.0 Each Pi has its own address, and the problem is also there, when only ...
by maddin1234
Mon Feb 10, 2014 9:33 pm
Forum: Troubleshooting
Topic: WLAN disappears after some time
Replies: 19
Views: 26326

Re: WLAN disappears after some time

Hi, I have some Pis and some Edimax and I found out, that my problem is related to the stick. When swapping the Edimax from one Pi to another, the problem is also swaped to the other Pi. I also found out, that there is also a problem ping the eth0 ip adress. When the error is there, I get no respons...
by maddin1234
Fri Apr 05, 2013 6:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello nexulm, no, I'm sorry but I didn't have a real result yet. I also had this problem with a 3.2 kernel, didn't check it with a 3.8 but don't think that it will make a difference. What I think about the problem now is: mcp2515- and spi-driver both use spin_lock_IRQsave. I didn't find a lot about ...
by maddin1234
Sat Mar 30, 2013 8:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I just want to point out, what I was working at the last days. I found out, that using polling-mode in the SPI driver increases the busload for roundabout 10% compared to interrupt driven mode. That lead me to another idea: Keeping IRQF_TRIGGER_FALLING but get rid of the spin_lock_IRQsave. I ...
by maddin1234
Sun Mar 24, 2013 11:35 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hi, when you are using the mcp251x driver, I think I know what is happening. I didn't have a deep look into the mcp251x driver, but one of the advantages of the mcp2515 driver is that it uses asynchronous spi transfer. That means, that the interrupt handler returns IRQ_HANDLED before all the work is...
by maddin1234
Sat Mar 23, 2013 5:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hi, thanks for the graphics. Crash #3, only RX looks suspicious. The first falling edge of the mcp2515-interrupt leads to a correct reaction. The mcp2515-driver reads the canintf register, sees that a rx-buffer is full, reads data from this buffer and clears rx-interrupt (see posts on page 5 for thi...
by maddin1234
Wed Mar 13, 2013 8:45 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hi again, I tried to use IRQF_TRIGGER_LOW for the mcp2515 driver today. To make the mcp2515-driver use the settings from the bcm2708.c file was quite easy. in the function static int mcp2515_open(struct net_device *dev) add:: struct mcp251x_platform_data *pdata = spi->dev.platform_data; replace IRQF...
by maddin1234
Tue Mar 12, 2013 6:11 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I did some more tests. cangen can0 -g 0 -i -I 400 -L 8 & results in 61.9% busload at 500kBit. When I remove all spin_locks from the mcp2515.c module, there is a little speed improvement to 62.3%. Only sending and only receiving seems to work find, but when sending and receiving at the same ti...
by maddin1234
Mon Mar 11, 2013 10:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello,
here they had the same ideas like we had.

http://lists.infradead.org/pipermail/li ... 00219.html

Greetings maddin
by maddin1234
Mon Mar 11, 2013 9:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I also read and thought a lot. 1.) spin_lock is just setting a lock-bit (very fast) spin_lock_irq sets the lock-bit and disables the interrupts (more code to execute) pin_lock_irqsave sets the lockbit, reads out the irq-state, saves it and disables interrupts (a lot of code) and similar for t...
by maddin1234
Sun Mar 10, 2013 9:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, while searching for information about spin_lock_irqsave I found a patch Raspberry SDHCI driver low latency patch https://gist.github.com/ddv2005/3454406 It looks like the only thing they do is to replace spin_lock_irqsave with a "local locking function": - spin_lock_irqsave(&host->lock, flags...
by maddin1234
Fri Mar 08, 2013 1:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

I found out, that the mcp2515 driver uses spin_lock_irqsave(&priv->lock, flags);

Does anyone know what this does exactly?
Does it disable the execution of a new interrupt in the operation system, or does it disable the recognition of an interrupt in the GPIO-registers?
by maddin1234
Fri Mar 08, 2013 11:56 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I tried to set IRQF_TRIGGER_LOW directly in the mcp2515_open function, but then the request_irq failed. I have to find out why. I also found that the mcp2515 driver uses spin_lock_irqsave(&priv->lock, flags); Does anyone know what this does exactly? Does it disable the execution of a new inte...
by maddin1234
Thu Mar 07, 2013 7:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello, I made some more test and now I don't have an idea anymore. In the "log" are informations from the bcm2708_gpio module for both interrupt sources and from the mcp2515 module only for can0 (to keep it readable). edsr at beginning of interrupt=0x00020000 i=17 gpio=17 CAN0_interrupt CAN0_read_fl...
by maddin1234
Thu Mar 07, 2013 7:56 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

I made some more test and now I don't have an idea anymore. In the "log" are informations from the bcm2708_gpio module for both interrupt sources and from the mcp2515 module only for can0 (to keep it readable). edsr at beginning of interrupt=0x00020000 i=17 gpio=17 CAN0_interrupt CAN0_read_flags CAN...
by maddin1234
Tue Mar 05, 2013 8:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I did some more tests with two mcp2515. It looks like the mcp2515 module stops clearing the intf register. I put some printk for one of the can channels to the code and this is the result: ... [ 531.998806] mcp2515_clear_canintf mcp2515 priv->transmit [ 531.999050] mcp2515_rts_txb0 mcp2515_rt...
by maddin1234
Tue Mar 05, 2013 8:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello,
I did some more tests and it looks like the mcp2515 driver stops clearing the interrupt register in the mcp2515.
I will change back to the mcp2515 post.
http://www.raspberrypi.org/phpBB3/viewt ... &start=200

Greetings maddin
by maddin1234
Sat Mar 02, 2013 8:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello, I found one more thing, that might cause the problem, and maybe it is quite easy to solve. The GPIOEDS bit is cleared after the generic_handle_irq has finished. During generic_handle_irq some functions from mcp2515 driver are executed. for example: mcp2515_interrupt(), mcp2515_read_flags() an...
by maddin1234
Sat Mar 02, 2013 7:53 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello, I found a thing in the mcp2515-driver, that could explain, why I don't see a difference, when I set IRQF_TRIGGER_LOW in the boarddefinition file. In the mcp2515_open, IRQF_TRIGGER_FALLING is used as a constant value. static int mcp2515_open(struct net_device *dev) ... ... err = request_irq(sp...
by maddin1234
Sat Mar 02, 2013 8:14 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello Zeta, I agree with you that this is a bug and should be reported. Also I am not sure that the calculation of the bank is correct. unsigned gb = gn / 32 gn / 32 is a floating point number, casted to an unsigned integer. What was intended here is to get the remainder of the division. Maybe the c...
by maddin1234
Thu Feb 28, 2013 8:11 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: two gpio interrupts on RPi
Replies: 10
Views: 7074

Re: two gpio interrupts on RPi

Hello, today I tested a new version. static irqreturn_t bcm2708_gpio_interrupt(int irq, void *dev_id) { unsigned long edsr0; unsigned long edsr1; unsigned bank; int i; unsigned gpio; edsr0 = readl(__io_address(GPIO_BASE) + GPIOEDS(0)); edsr1 = readl(__io_address(GPIO_BASE) + GPIOEDS(1)); do { for_ea...
by maddin1234
Wed Feb 27, 2013 8:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: CAN controller
Replies: 811
Views: 299325

Re: CAN controller

Hello,
I decided to continue the GPIO interrupt topic in a new post

http://www.raspberrypi.org/phpBB3/viewt ... 44&t=35371

Greetings maddin

Go to advanced search