howto proof of working?

Moderators: mdrjr, odroid

howto proof of working?

Unread postby fvolk » Sun Oct 08, 2017 10:23 pm

I finally got my 3.5 LCD shield
I can load the kernel modules

Code: Select all
[  112.618596] aml_i2c version: 20140813
[  112.619046] aml-i2c c1108500.i2c: add adapter aml_i2c_adap1(ffffffc0581668e0)
[  112.628397] sx865x 2-0049: sx865x_probe()
[  112.630493] sx865x 2-0049: swap_xy (1)
[  112.630505] sx865x 2-0049: invert_x (0)
[  112.630511] sx865x 2-0049: invert_y (1)
[  112.630516] sx865x 2-0049: gpio pendown (218)
[  112.630521] sx865x 2-0049: gpio reset (224)
[  112.630525] sx865x 2-0049: gpio irq (96)
[  112.631472] input: SX865X Touchscreen as /devices/i2c-2/2-0049/input/input2
[  112.631672] sx865x 2-0049: probe ok! registered with irq (96)
[  112.631708] aml-i2c c11087c0.i2c: add adapter aml_i2c_adap2(ffffffc058a608e0)
[  112.652883] meson_pwm pwm: register pwm device.. meson_pwm_probe
[  112.672688] pwm-ctrl pwm-ctrl: cannot export to PWM-1 : modprobe pwm-meson npwm=2
[  112.704010] fbtft_device:  SPI devices registered:
[  112.704025] fbtft_device:  'fb' Platform devices registered:
[  112.704061] fbtft_device:      meson-fb id=-1 pdata? no
[  112.704277] fbtft_device:  GPIOS used by 'flexpfb':
[  112.705143] fbtft_device:    'reset' = GPIO247
[  112.705153] fbtft_device:    'dc' = GPIO228
[  112.705157] fbtft_device:    'wr' = GPIO229
[  112.705161] fbtft_device:    'cs' = GPIO238
[  112.705165] fbtft_device:    'db00' = GPIO233
[  112.705168] fbtft_device:    'db01' = GPIO231
[  112.705171] fbtft_device:    'db02' = GPIO236
[  112.705175] fbtft_device:    'db03' = GPIO230
[  112.705178] fbtft_device:    'db04' = GPIO232
[  112.705181] fbtft_device:    'db05' = GPIO235
[  112.705185] fbtft_device:    'db06' = GPIO237
[  112.705188] fbtft_device:    'db07' = GPIO239
[  112.705191] fbtft_device:  'fb' Platform devices registered:
[  112.705223] fbtft_device:      meson-fb id=-1 pdata? no
[  112.705276] fbtft_device:      flexpfb id=0 pdata? yes
[  113.081802] graphics fb2: flexfb frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=20


The 4 buttons are working.
I can enable the LCD and change brightness.
However, the LCD only displays white and nothing else.

I tried the "mplayer bigbuckbunny" test
as well as "cat /dev/urandom > /dev/fb2",
as well as moving a console to the LCD display according to the HK Wiki.

Question:
How to do a basic check whether this is a software problem or a hardware problem? - I'm asking because I received the hardware package with the tape cut open....
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby fvolk » Sun Oct 08, 2017 11:03 pm

C2 with kernel 3.14.79-116
official Ubuntu minimal, all packages updated

init script
Code: Select all
sudo modprobe aml_i2c
sudo modprobe pwm-meson
sudo modprobe pwm-ctrl
sudo modprobe fbtft_device name=flexpfb rotate=270
sudo modprobe flexfb chip=ili9488
sudo modprobe sx865x

cat /sys/class/graphics/fb2/name

echo 500000 | sudo tee /sys/devices/platform/pwm-ctrl/freq0
echo 1 | sudo tee /sys/devices/platform/pwm-ctrl/enable0
echo 1023 | sudo tee /sys/devices/platform/pwm-ctrl/duty0
Attachments
lcd_white.jpg
lcd_white.jpg (21.4 KiB) Viewed 1042 times
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Mon Oct 09, 2017 12:17 am

Hmm. Are you running a stock image? Maybe you've loaded some modules that take over some gpio pins. Do you get any error in dmesg? Can you also try with a stock image and @fourdee's 3.5" installation script?
There is also a cat /sys/class/gpio/debug which tells you which gpios are in use.
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Mon Oct 09, 2017 12:59 am

mad_ady wrote:Hmm. Are you running a stock image? Maybe you've loaded some modules that take over some gpio pins. Do you get any error in dmesg? Can you also try with a stock image and @fourdee's 3.5" installation script?
There is also a cat /sys/class/gpio/debug which tells you which gpios are in use.


I started with a fresh image and just did apt update+upgrade+dist-upgrade...

Code: Select all
# cat /sys/class/gpio/debug
cat: /sys/class/gpio/debug: No such file or directory
# ls  /sys/class/gpio/
export  gpiochip122  gpiochip136  unexport
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Mon Oct 09, 2017 3:40 am

Try

/sys/kernel/debug/gpio
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Mon Oct 09, 2017 4:09 am

Code: Select all
# cat /sys/kernel/debug/gpio
GPIOs 122-135, platform/c1109880.pinmux, ao-bank:
 gpio-125 (amlsd               ) out hi   
 gpio-127 (?                   ) in  lo   
 gpio-135 (blue:heartbeat      ) out hi   

GPIOs 136-255, platform/c1109880.pinmux, banks:
 gpio-150 (rst_pin             ) in  hi   
 gpio-165 (amlsd               ) out hi   
 gpio-180 (amlsd               ) in  lo   
 gpio-218 (ts-pendown          ) in  hi   
 gpio-223 (amlsd               ) out hi   
 gpio-224 (ts-reset            ) out hi   
 gpio-228 (flexfb              ) out hi   
 gpio-229 (flexfb              ) out hi   
 gpio-230 (flexfb              ) out lo   
 gpio-231 (flexfb              ) out lo   
 gpio-232 (flexfb              ) out lo   
 gpio-233 (flexfb              ) out lo   
 gpio-235 (flexfb              ) out lo   
 gpio-236 (flexfb              ) out lo   
 gpio-237 (flexfb              ) out lo   
 gpio-238 (flexfb              ) out lo   
 gpio-239 (flexfb              ) out lo   
 gpio-247 (flexfb              ) out hi   
 gpio-249 (w1                  ) in  hi
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Mon Oct 09, 2017 4:35 am

Ok, I see you have onewire using a gpio. Try to blacklist the w1 and wire modules (remove them from /etc/modules, blacklist them in /etc/modprobe.d/*) and reboot.
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Mon Oct 09, 2017 4:43 am

deleted .../kernel/drivers/w1

Code: Select all
# lsmod |grep w1
root@odroid64:~# cat /sys/kernel/debug/gpio
GPIOs 122-135, platform/c1109880.pinmux, ao-bank:
 gpio-125 (amlsd               ) out hi   
 gpio-127 (?                   ) in  lo   
 gpio-135 (blue:heartbeat      ) out hi   

GPIOs 136-255, platform/c1109880.pinmux, banks:
 gpio-150 (rst_pin             ) in  hi   
 gpio-165 (amlsd               ) out hi   
 gpio-180 (amlsd               ) in  lo   
 gpio-218 (ts-pendown          ) in  hi   
 gpio-223 (amlsd               ) out hi   
 gpio-224 (ts-reset            ) out hi   
 gpio-228 (flexfb              ) out hi   
 gpio-229 (flexfb              ) out hi   
 gpio-230 (flexfb              ) out lo   
 gpio-231 (flexfb              ) out lo   
 gpio-232 (flexfb              ) out lo   
 gpio-233 (flexfb              ) out lo   
 gpio-235 (flexfb              ) out lo   
 gpio-236 (flexfb              ) out lo   
 gpio-237 (flexfb              ) out lo   
 gpio-238 (flexfb              ) out lo   
 gpio-239 (flexfb              ) out lo   
 gpio-247 (flexfb              ) out hi


249 is no longer w1, but change :-/
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby odroid » Mon Oct 09, 2017 9:21 am

Can you show us "lsmod" output?
User avatar
odroid
Site Admin
 
Posts: 25306
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: howto proof of working?

Unread postby fvolk » Mon Oct 09, 2017 2:49 pm

Code: Select all
# lsmod
Module                  Size  Used by
flexfb                 16664  0
fbtft_device           35879  0
fbtft                  37815  2 flexfb,fbtft_device
syscopyarea             2825  1 fbtft
sysfillrect             3723  1 fbtft
sysimgblt               1933  1 fbtft
fb_sys_fops             1357  1 fbtft
pwm_ctrl                6707  0
pwm_meson               4570  1
joydev                 11039  0
sx865x                  5235  0
aml_i2c                16898  0
meson_gpiomem           4024  0
gxbb_wdt                3427  0
ipv6                  376636  16
autofs4                28111  2
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Mon Oct 09, 2017 3:03 pm

Is there anything unusual in dmesg when you insert the modules?
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Mon Oct 09, 2017 3:13 pm

See dmesg output in first posting.

I'm asking for help because I have nothing to compare to.
May I did something wrong and it is an installation problem/typo somewhere,
but maybe I got a pre-used unit which was already sent back once because it really is broken...

Note this is a headless minimal server, so no X, just remote login.
What's the cheapest way to change any pixel on the screen to test correct function?
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby odroid » Mon Oct 09, 2017 8:03 pm

Your test process seems to be fine.
We will try it on the same latest kernel tomorrow.

Did you buy it from us directly? or distributor?
User avatar
odroid
Site Admin
 
Posts: 25306
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: howto proof of working?

Unread postby fvolk » Tue Oct 10, 2017 1:30 am

I started from
Code: Select all
7fd4fd8fa21379721cb5726c4fae1cfb  ubuntu64-16.04-minimal-odroid-c2-20160815.img


remote login, upgraded all packages+kernel to current, reboot+remote login again and run lcd init script see first post.

Bought @Pollin. The tape on the box was on one side already opened, so that's why I'm curious whether I actually got a new unit....
Attachments
lcd_open.jpg
lcd_open.jpg (23.03 KiB) Viewed 776 times
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby odroid » Tue Oct 10, 2017 2:32 pm

Normally we don't attach any tape on the box.
I am not sure whether Pollin attached it or not.

Anyway, we will test the 3.5inch LCD driver functionality on Kernel 3.14.79-116 soon.
Please give us one more day since we've just returned from 10days of national holiday.
User avatar
odroid
Site Admin
 
Posts: 25306
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: howto proof of working?

Unread postby mad_ady » Tue Oct 10, 2017 2:32 pm

Can you try the installation script without updating the system? Though my 3.5" lcd runs on a fully updated C2
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Wed Oct 18, 2017 3:11 am

Started fresh, this time from ubuntu64-16.04.2lts-mate-odroid-c2-20170301.img
Initially boots up with desktop on HDMI.
Run install_odroid_LCD35.sh 1
Reboot
Boot is on HDMI, then HDMI goes black and LCD switches on.
...but only shows white :-/

apt update+upgrade+dist-upgrade.
Now on 3.14.79-116
Same :-/
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby odroid » Wed Oct 18, 2017 9:13 am

Sorry for late reply.
We tested it with Kernel 3.14.79-116 and it worked.

Your LCD board or C2 40pin header seems to have a hardware issue.
Please contact "Pollin" with a link of this thread to replace it.
User avatar
odroid
Site Admin
 
Posts: 25306
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: howto proof of working?

Unread postby fvolk » Sun Dec 10, 2017 2:35 am

Received replacement, attached it, booted identical microSD card and.... just works - see photo.

Considering 1) Pollin sent me an already opened package first time 2) the time I initially wasted to get it to work 3) it took them ~2 months for a replacement....
Attachments
lcd_new.jpg
lcd_new.jpg (48.29 KiB) Viewed 212 times
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby fvolk » Sun Dec 10, 2017 3:01 am

Unfortunately, one button appears to be broken on this one:
root@odroid64:~# cat /sys/class/saradc/ch0
1019
root@odroid64:~# cat /sys/class/saradc/ch0
772
root@odroid64:~# cat /sys/class/saradc/ch0
685
root@odroid64:~# cat /sys/class/saradc/ch0
513
root@odroid64:~# cat /sys/class/saradc/ch0
1019

No button, and then pressing buttons from bottom going up.

...I'm not sending this thing back again and wait 2 months again :-/
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Sun Dec 10, 2017 3:36 am

The top button should output close to 0 when pressed. There's a schematic on the wiki and all buttons are connected like a rezistive divider. If a solder point is imperfect it may have a button disconnected. It should be easy to fix with a soldering iron because the components are widley spaced.
My problem with the top button is that from time to time (once every few weeks) the ADC registers a quick button press even if it wasn't pressed.

You can increase the number of actions you can trigger by using the multibutton script presented in odroid magazine.
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: howto proof of working?

Unread postby fvolk » Sun Dec 10, 2017 4:25 am

The broken button feels different when pushed, so I guess it is the button itself and not a soldering problem. This seems like a broken button was used at manufactoring. I guess the best way is to cut the 4 connectors and solder a new button of similar size in.
fvolk
 
Posts: 134
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: howto proof of working?

Unread postby mad_ady » Sun Dec 10, 2017 4:45 am

Yes. It seems to be a common button type, like the one they supply in the tinkering kit.
User avatar
mad_ady
 
Posts: 2872
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2


Return to 3.5inch LCD Shield

Who is online

Users browsing this forum: No registered users and 2 guests