Monday, May 11, 2009

LCD problem

After the new LCD is installed, and driver is modified, LCD shows the correct image as expected, but suddenly flicking with white image. after the LCD slept, and waked it up, image showed up again, but hadn't stood there for a while, again, it got wrong again.

still figuring what the reason is.

Saturday, May 9, 2009

production test

Today, we started all the test on the pr1 board, the USBNET problem happened yesterday had been resolved, the reason was the new charger IC, when the init the driver of chargeID, the USB power was not pull to high.

during the test, a big problem for display the color was found, pure red, blue, and green are ok, but when the color changed lighter, there are serveral white line show on the screen. this might be wrong with the initial lcd data.

Thursday, May 7, 2009

production test

after serveral days working on drivers of LCD, charger IC, light sensor, by neol. finally release the test version for product test team. but suprisely, still got a lot of problem.

the LCD display wrong direction, rotate 180 degree, there is a setting for rotating, but the Touch driver and keypad still got wrong directions. but the LCD has register for rotate the display, after discussion with LCD supplier by HW guys, finially found the register and value for that.

another strange problem is the USB NET does't work since changing the charge IC driver, noel is still trying to figure out the problem and maybe tommrow, we can fix it.

Wednesday, May 6, 2009

CPU frenqency change effect on LCD display

During test on the driver of LCD, we found the cpu frenquency changed depending on the algorithm which can save the power of CPU usage, but this affect on Sharp LCD flick all the time when the frenquency of cpu changes.

the solution on this we find out is a workaround method, which is: whenever the LCD is woken up, the frenquency will be set to steady, and release the setting when LCD sleeps.

gps production test

After the discussion and test on the pc production sw with the p0 board, finally got it work,

reason why it does't work, because the chip set changed from GSC2dw to gsd 2dw, the sirf chip changed. so the lapi server change also, it should be compatible with these two chipsets.

and also in test command server which has interfaces with lapi server doesn't work on the changes

Here there is a client application lapi_unit can directory connect with lapisrv. command is lapi_unit -LM, wow shit. this command is invoke by the test command server via shell script.

Tuesday, May 5, 2009

work around on pthread_cancel for android boinic

after two days research on pthread_cancel, I found android boinic libc doesn't support it.

currently I'm designing a timer to handle pthread lifecycle, each pthread in pool has its own timer, when timer out, orignally I want to use pthread_cancel to let the that pthread die, but I found pthread_cancel has several drawbacks, such it will produce the dead lock when the pthread is mutexed, and must be careful to deal with this kind of condition. another one is android boinic libc doesn't support it.

Then I use pthread_kill to trigger a SIG_USR1 signal and use signal handler to exit this pthread
and tried it, it works, but still wondering if any drawbacks for this kind of method.
Timer out:

if ( (status = pthread_kill(pthread_id, SIGUSR1)) != 0)
{
printf("Error cancelling thread %d, error = %d (%s)", pthread_id, status, strerror status));
}

USR1 handler:

struct sigaction actions;
memset(&actions, 0, sizeof(actions));
sigemptyset(&actions.sa_mask);
actions.sa_flags = 0;
actions.sa_handler = thread_exit_handler;
rc = sigaction(SIGUSR1,&actions,NULL);
void thread_exit_handler(int sig)
{
printf("this signal is %d \n", sig);
pthread_exit(0);
}

luck us on production board

PR1 trial hardware has been received, and after half day modification on GPIO change and update on lcd driver, first 3 boards even could not be lighted up. after the 4th trial, the log is printed up but an other problem happened, the system rebooted after the kernal was loaded, tried several change on OBM and blob, still not working, shit....

when hardware colleagues tested the last 2 boards, we tried each one, finally the whole android system works. wow, lucky us , there is one board working at all..