sleep and wake up implementation

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

fcanoy
Posts: 5
Joined: Wed Aug 31, 2005 1:38 pm

sleep and wake up implementation

Wed Aug 31, 2005 1:53 pm

Hi all,

We are currently developing a gpio driver that needs to sleep during select() system call and wake up when an interrupt occured. We are using linux-2.4.19rmk linux kernel and AT91RM9200-EK board. However, the system hang up when we include the wake_up_interruptible() function in our interrupt handler.

At first, we thought that this was due to mishandling of GPIO interrupts. We decided to create a simple driver so that the read() system call forces the driver to sleep using interruptible_sleep_on() function and the write() system call wakes the driver using wake_up_interruptible(). The system hang up is still experienced and the "Unable to handle kernel NULL pointer dereference..." message is displayed.

When we tried running the same driver and the same application on our x86 system running RedHat 7.3 using linux-2.4.18 kernel, the driver and the application works fine.

Any assistance is really appreciated.
fcanoy
fcanoy
Posts: 5
Joined: Wed Aug 31, 2005 1:38 pm

sleep and wake up implementation

Thu Sep 01, 2005 11:26 am

Hi all,

It has been discovered that the cause of our problem was due to the wrong cross compiler used in compiling the module. We were using the arm-linux-gcc provided by buildroot. But when we used the arm-linux-gcc provided by cross-2.95.3.tar.bz2, the driver's sleep/wake function works correctly.

fcanoy

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 1 guest