Jump to content

Orange Pi Zero Plus 2 settings with 1.8 TFT screen


StephenW

Recommended Posts

I tried to build the armbian on my Orange Pi Zero Plus 2 to work on my astro project.

I'm planning to connect the board to the camera module, which I'd assemble with a small scope (120mm focal length), and with a small TFT screen to make it a electronic finder scope.

 

When I build and install the stretch server I've encounter several instability.  There were some random crashes and finally I was able to get it stable. I'd like to share it here in case anyone is encountering the same. Here's the info:


First I was experiencing random crashes and the exception message shows there's a problem at the high resolution timer. I simply disable the hr timer on the build. That solved the problem.

Then I still experiencing random crashes, saying "Insufficient stack space to handle exception". Appearing the default stack of 8Mb was not enough. I make it 16Mb and now it's running stable. Tried running stress for 1 hr and the board is still running fine. So appearing everything is stable now.

 

And I struggle a little bit to make the spidev & tft driver to work with the OrangePi.  Here's a very useful guide here: 

http://eessential.blogspot.hk/2017/12/18-128-x-160-tft-lcd.html?m=1

 

 

Description:    Debian GNU/Linux 9.3 (stretch)
Release:        9.3
Codename:       stretch

Kernel: 4.14.18

 

Link to comment
Share on other sites

That display is easy to work with if you don't need direct Linux/X11 support. What I mean is that I've written code to talk to those LCDs and it can draw text and graphics through direct function calls (e.g. Draw a string a of text at a specific x,y in a specific color). If that's sufficient for your project, give it a try:

 

https://github.com/bitbank2/SPI_LCD

 

Link to comment
Share on other sites

7 hours ago, StephenW said:

When I build and install the stretch server I've encounter several instability.  There were some random crashes and finally I was able to get it stable. I'd like to share it here in case anyone is encountering the same. Here's the info:


First I was experiencing random crashes and the exception message shows there's a problem at the high resolution timer. I simply disable the hr timer on the build. That solved the problem.

Then I still experiencing random crashes, saying "Insufficient stack space to handle exception". Appearing the default stack of 8Mb was not enough. I make it 16Mb and now it's running stable. Tried running stress for 1 hr and the board is still running fine. So appearing everything is stable now.


Can you provide a patch? Thank you.

Link to comment
Share on other sites

Igor - After leaving the system running for one night, I've found that the system is still unstable.  I'm still experiencing "Insufficient stack space to handle exception" and reboot, even I boost the stack up to 64Mb. I'll have to spend time to trace the map and see which code caused the problem.

Link to comment
Share on other sites

On 2/15/2018 at 8:57 PM, Larry Bank said:

That display is easy to work with if you don't need direct Linux/X11 support. What I mean is that I've written code to talk to those LCDs and it can draw text and graphics through direct function calls (e.g. Draw a string a of text at a specific x,y in a specific color). If that's sufficient for your project, give it a try:

 

https://github.com/bitbank2/SPI_LCD

 

Thanks I will give it a try.  You're right that I'm not intended to show any desktop UI

Link to comment
Share on other sites

When I tried to debug the insufficient stack space I've found the exception throws at different lines of codes, example below.

You can see the exception throws at different times, regardless of the loads. Sometimes it happens few seconds after boot and sometimes it happens after a few hours of idle time.

 

Any ideas?

 

 

[ 5336.489446] Insufficient stack space to handle exception!
[ 5336.489455] ESR: 0x9a000000 -- SP Alignment
[ 5336.499040] FAR: 0x0000aaab157f06c0
[ 5336.502541] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[ 5336.502543] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[ 5336.502546] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[ 5336.502556] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[ 5336.502558] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[ 5336.502561] task: ffff800016969b00 task.stack: ffff000008df8000
[ 5336.502575] PC is at cpu_needs_another_gp+0x5c/0x80
 

orangepizeroplus2 login: [ 2808.322852] Insufficient stack space to handle exception!
[ 2808.322863] ESR: 0x9a000000 -- SP Alignment
[ 2808.332442] FAR: 0x0000ffff93b3fd25
[ 2808.335926] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[ 2808.342270] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[ 2808.348614] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[ 2808.354963] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[ 2808.361740] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[ 2808.367391] task: ffff800016969b00 task.stack: ffff000008df8000
[ 2808.373314] PC is at cpu_needs_another_gp+0x5c/0x80
 

armbian@orangepizeroplus2:/boot$ [ 3604.982936] Insufficient stack space to handle exception!
[ 3604.982946] ESR: 0x9a000000 -- SP Alignment
[ 3604.992526] FAR: 0x0000ffffc68c9bb0
[ 3604.996009] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[ 3605.002354] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[ 3605.008698] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[ 3605.015046] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[ 3605.021824] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[ 3605.027475] task: ffff800016969b00 task.stack: ffff000008df8000
[ 3605.033395] PC is at el1_sync+0x0/0xb0
 

[    5.311930] Insufficient stack space to handle exception!
[    5.311938] ESR: 0x9a000000 -- SP Alignment
[    5.321515] FAR: 0x0000ffffb2e7a210
[    5.324998] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[    5.331342] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[    5.337686] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[    5.344035] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[    5.350812] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[    5.356463] task: ffff800016969b00 task.stack: ffff000008df8000
[    5.362383] PC is at el1_sync+0x0/0xb0
 

armbian@orangepizeroplus2:~$ [  450.420907] Insufficient stack space to handle exception!
[  450.420920] ESR: 0x9a000000 -- SP Alignment
[  450.430498] FAR: 0x0000ffffaec494c8
[  450.433982] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[  450.440326] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[  450.446670] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[  450.453019] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[  450.459796] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[  450.465449] task: ffff800016969b00 task.stack: ffff000008df8000
[  450.471370] PC is at invoke_rcu_core+0x0/0x50
 

armbian@orangepizeroplus2:~$ [27696.023824] Insufficient stack space to handle exception!
[27696.023838] ESR: 0x9a000000 -- SP Alignment
[27696.033419] FAR: 0x00000000348e1c64
[27696.036902] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[27696.043247] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[27696.049591] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[27696.055941] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[27696.062718] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[27696.068370] task: ffff800016969b00 task.stack: ffff000008df8000
[27696.074293] PC is at invoke_rcu_core+0x0/0x50
 

 

orangepizeroplus2 login: [   23.856944] Insufficient stack space to handle exception!
[   23.856959] ESR: 0x96000044 -- DABT (current EL)
[   23.866974] FAR: 0x00000000001efef0
[   23.870457] Task stack:     [0xffff000008df8000..0xffff000008dfc000]
[   23.876801] IRQ stack:      [0xffff000008010000..0xffff000008014000]
[   23.883146] Overflow stack: [0xffff800017f9d0b0..0xffff800017f9e0b0]
[   23.889495] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[   23.896272] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[   23.901923] task: ffff800016969b00 task.stack: ffff000008df8000
[   23.907847] PC is at wakeup_softirqd+0x0/0x38
 

 

orangepizeroplus2 login: [ 6210.617130] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[ 6210.625227] Mem abort info:
[ 6210.628017]   Exception class = DABT (current EL), IL = 32 bits
[ 6210.633928]   SET = 0, FnV = 0
[ 6210.636976]   EA = 0, S1PTW = 0
[ 6210.640110] Data abort info:
[ 6210.642985]   ISV = 0, ISS = 0x00000004
[ 6210.646814]   CM = 0, WnR = 0
[ 6210.649778] user pgtable: 4k pages, 48-bit VAs, pgd = ffff800014f60000
[ 6210.656296] [0000000000000008] *pgd=0000000000000000
[ 6210.661257] Internal error: Oops: 96000004 [#1] SMP
[ 6210.666128] Modules linked in: snd_soc_hdmi_codec rc_cec dw_hdmi_i2s_audio dw_hdmi_cec cdc_ether usbnet r8152 sun8i_dw_hdmi dw_hdmi cec rc_core spidev sun8i_codec_analog sun4i_gpadc_iio snd_soc_simple_card snd_soc_simple_card_utils snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer sun8i_mixer sun4i_tcon iio_hwmon sun4i_drm industrialio usb_f_acm u_serial g_serial libcomposite brcmfmac brcmutil cfg80211 rfkill sunxi musb_hdrc
[ 6210.703673] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.18-sunxi64 #26
[ 6210.710450] Hardware name: Xunlong Orange Pi Zero Plus2 (DT)
[ 6210.716100] task: ffff800016969b00 task.stack: ffff000008df8000
[ 6210.722021] PC is at rcu_segcblist_future_gp_needed+0x0/0x48
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines