F133-A 驱动SST7789有没有人成功过
-
sys_config_nor.fex文件中已修改为SST7789_CPU驱动
[lcd0] lcd_used = <1>; lcd_driver_name = "st7789v_cpu"; lcd_backlight = <150>; lcd_if = <1>; lcd_x = <240>; lcd_y = <320>; lcd_width = <108>; lcd_height = <64>; lcd_dclk_freq = <18>; lcd_pwm_used = <1>; lcd_pwm_ch = <6>; lcd_pwm_freq = <50000>; lcd_pwm_pol = <1>; lcd_pwm_max_limit = <100>; lcd_hbp = <60>; lcd_ht = <298>; lcd_hspw = <30>; lcd_vbp = <340>; lcd_vt = <336>; lcd_vspw = <2>; lcd_frm = <1>; lcd_io_phase = <0x0000>; lcd_hv_clk_phase = <0>; lcd_hv_sync_polarity= <0>; lcd_hv_data_polarity = <1>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; lcdgamma4iep = <22>; lcd_cpu_mode = <1>; lcd_cpu_te = <1>; lcd_cpu_if = <8>; lcd_hv_if = <0>; lcd_hv_srgb_seq = <0>; lcd_rb_swap = <0>; lcd_gpio_0 = <&pio PG 2 1 0 3 0>; lcd_gpio_1 = <&pio PD 21 1 0 3 0>; pinctrl-0 = <&rgb8_pins_a>; pinctrl-1 = <&rgb8_pins_b>;
其中rgb8_pins_a 和 rgb8_pins_b 在所有文件中均未搜索到 不知道在哪调用的
make menuconfig中已经打开SST7789_CPU驱动
编译报错
修改SST7789_CPU驱动 kmalloc 改为 malloc 后编译不报错/*static int bootup_flag = 0;*/ static void LCD_panel_init(u32 sel) { struct disp_panel_para *info = //kmalloc(sizeof(struct disp_panel_para), GFP_KERNEL); malloc(sizeof(struct disp_panel_para)); DBG_INFO("\n"); bsp_disp_get_panel_info(sel, info); lcd_panel_st7789v_init(sel, info); disp_sys_free(info); return; }
编译打包运行报错
=============================================================================================================== | /'\_/`\ (_ ) _ ( )( ) /' _`\ /' _`\ | | | __ | | (_) ___ ______ _ _ | || | | ( ) | | ( ) | | | (_) | /'__`\ | | | |/',__)(______)( ) ( )| || |_ | | | | | | | | | | | | |( ___/ | | | |\__, \ | \_/ |(__ ,__) _ | (_) | _ | (_) | | (_) (_)`\____)(___)(_)(____/ `\___/' (_) (_)`\___/'(_)`\___/' |version : V3.9.0 | |commitid: bea46cdf307086132c4a8de26837731de1388ce5 | |sunxiver: 40000 | |timever : Thu, 13 Jul 2023 12:51:20 +0800 | |compiler: gcc version 8.4.0 (T-HEAD RISCV Tools V1.10.2 B20201104) | |optimal : -Os -g -gdwarf-2 -gstrict-dwarf | |linker : GNU ld (GNU Binutils) 2.32 | |newlibc : 3.0.0 | |author : cq | =============================================================================================================== [DBG]: [__mount_parts:0299]: classname=DMS [DBG]: [__mount_parts:0300]: devname=dms01 [DBG]: [__mount_parts:0327]: find last lun. [DBG]: [__mount_parts:0357]: nPart = 1. [DBG]: [__mount_parts:0486]: dmsPart: "DMS\dms010" is linked to symbel "B". [ERR]: [esFSYS_pread:0331]: fs fatal err [ERR]: [esFSYS_pread:0331]: fs fatal err [ERR]: [esFSYS_pread:0331]: fs fatal err [ERR]: [esFSYS_pread:0331]: fs fatal err mount errno: -19! [DBG]: [esFSYS_mntfs:0333]: melis_devfs,mount on B. [DBG]: [kservice_maintask:0845]: partition [B] plug in.. [DBG]: [__mount_parts:0299]: classname=DISK [DBG]: [__mount_parts:0300]: devname=RAMDISK [DBG]: [__mount_parts:0327]: find last lun. [DBG]: [__mount_parts:0357]: nPart = 1. [DBG]: [__mount_parts:0486]: rawpart: "DISK\RAMDISK0" is linked to symbel "C". [ERR]: [esFSYS_mntfs:0314]: identify the filesystem failure. [ERR]: [__mount_parts:0541]: mount C failure. [WRN]: [do_initcall_level:0096]: initcall: 0x0000000040032ef8. [WRN]: [do_initcall_level:0096]: initcall: 0x0000000040033110. [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400331c8. [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400392ca. [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400393f2. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004008bbd6. dfs already init. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004008e3fa. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004008ee7c. [WRN]: [do_initcall_level:0096]: initcall: 0x0000000040031384. flash : 1 sip : 0 hal_spi_hw_config()2025 [spi0] clock_frequency = 50000000HZ hal_spi_init()2215 [spi0] DMA xfer enable nor_scan flash : 1 sip : 0 hal_spi_hw_config()2025 [spi0] clock_frequency = 50000000HZ hal_spi_init()2215 [spi0] DMA xfer enable nor_factory_init nor flash init ok scheduler startup [DBG]: [__mount_parts:0299]: classname=DISK [DBG]: [__mount_parts:0300]: devname=ROOTFS [DBG]: [__mount_parts:0327]: find last lun. [DBG]: [__mount_parts:0357]: nPart = 1. [DBG]: [__mount_parts:0486]: rawpart: "DISK\ROOTFS0" is linked to symbel "D". [DBG]: [esFSYS_mntfs:0333]: minfs,mount on D. [DBG]: [kservice_maintask:0845]: partition [D] plug in.. [DBG]: [melis_udisk_part_check:0557]: melis_udisk_part_check 557 copy udisk_buff [DBG]: [__mount_parts:0299]: classname=DISK [DBG]: [__mount_parts:0300]: devname=UDISK [DBG]: [__mount_parts:0327]: find last lun. [DBG]: [check_msdos_partition:0640]: [DBG]: [__mount_parts:0357]: nPart = 1. [DBG]: [__mount_parts:0486]: rawpart: "DISK\UDISK0" is linked to symbel "E". [DBG]: [esFSYS_mntfs:0333]: fat,mount on E. [DBG]: [kservice_maintask:0845]: partition [E] plug in.. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004003a348. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004003a414. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004003a8d6. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004003ab40. [ERR]: [hal_ths_init:0094]: 0x2009404, 0x2009400, 0x2009430, 0x2009408 key name:thermal_sensor key size:64 key offset:20 thermal_sensor: f2 00 99 89 0e b0 e1 01 [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400311b2. [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400331d8. [WRN]: [do_initcall_level:0096]: initcall: 0x000000004003458e. [WRN]: [do_initcall_level:0096]: initcall: 0x00000000400399ae. [WRN]: [do_initcall_level:0096]: initcall: 0x0000000040039e68. the cir_master_init success [WRN]: [do_initcall_level:0096]: initcall: 0x0000000040065296. Warning: clk pll-audio0 should not be changed, please recheck whether the operation is correct [DBG]: [LDR_LoadFile:0261]: filepath = d:\mod\slib.mod. [WRN]: [MODS_LoadSectionData:0129]: size 216, addr = 00000000e8700000. [WRN]: [MODS_LoadSectionData:0129]: size 8440, addr = 00000000e87000d8. [WRN]: [MODS_LoadSectionData:0129]: size 568, addr = 00000000e87021d0. [DBG]: [LDR_LoadFile:0261]: filepath = d:\mod\display.mod. [WRN]: [MODS_LoadSectionData:0129]: size 10432, addr = 00000000e9a00000. [WRN]: [MODS_LoadSectionData:0129]: size 5032, addr = 00000000e9a028c0. [WRN]: [MODS_LoadSectionData:0129]: size 1872, addr = 00000000e9a03c68. [WRN]: [MODS_LoadSectionData:0129]: size 6264, addr = 00000000e9a043b8. [WRN]: [Mod_Display_MInit:1092]: ...Mod_Display_MInit [WRN]: [Mod_Display_MOpen:1105]: ....Mod_Display_MOpen mp.used = 0 [WRN]: [Mod_Display_MOpen:1115]: ....Mod_Display_MOpen mod_disp_mp.mid = fa (__mp *)&mod_disp_mp = e9a05818 [DBG]: [LDR_LoadFile:0261]: filepath = d:\mod\mixture.mod. [WRN]: [MODS_LoadSectionData:0129]: size 16216, addr = 00000000e9b00000. [WRN]: [MODS_LoadSectionData:0129]: size 3572, addr = 00000000e9b03f58. [WRN]: [MODS_LoadSectionData:0129]: size 20, addr = 00000000e9b04d4c. [WRN]: [MODS_LoadSectionData:0129]: size 1056, addr = 00000000e9b04d60. [WRN]: [LoadDataFromFile:0163]: fileLen=14891 [WRN]: [open_ram_bmp:0250]: base=0x40dd0000, size=0x3a2b [WRN]: [open_ram_bmp:0279]: bg pic is compress... [WRN]: [Parse_Pic_BMP_ByRam:0159]: bmp:(32, 640, 480, 2560) [WRN]: [close_bmp:0227]: esMEMS_Pfree: g_pbmp_buf=40dd4000, g_bmp_size=1228854 ,Psize = 1201 [DBG]: [layer_request:0691]: layer_request MOD_DISP_LAYER_WORK_MODE_SCALER [DBG]: [layer_request:0739]: requested: ch:0, id:0 disp_mgr[0].req_layer_cnt = 1 [ERR]: [open_lcd_backlight:0627]: get backlight err,default to 100 [DBG]: [LDR_LoadFile:0261]: filepath = d:\mod\charset.mod. [WRN]: [MODS_LoadSectionData:0129]: size 32, addr = 00000000e4400000. [WRN]: [MODS_LoadSectionData:0129]: size 1544, addr = 00000000e4400020. [WRN]: [MODS_LoadSectionData:0129]: size 222016, addr = 00000000e4400628. msh />enter app_entry Execute startup script begin.............. install mod para num [2]: insmod d:\mod\orange.mod [DBG]: [LDR_LoadFile:0261]: filepath = d:\mod\orange.mod. [WRN]: [MODS_LoadSectionData:0129]: size 4184, addr = 00000000e1800000. [WRN]: [MODS_LoadSectionData:0129]: size 181108, addr = 00000000e1801058. [WRN]: [MODS_LoadSectionData:0129]: size 82956, addr = 00000000e182d3cc. [WRN]: [MODS_LoadSectionData:0129]: size 1392, addr = 00000000e18417d8. [WRN]: [MODS_LoadSectionData:0129]: size 280384, addr = 00000000e1841d48. [WRN]: [GUI_Init:0080]: GUI_Init gui get scn w = 0 h = 0 Mod:d:\mod\orange.mod Installed!, mod id=120 install mod para num [2]: insmod d:\apps\desktop.mod [DBG]: [LDR_LoadFile:0261]: filepath = d:\apps\desktop.mod. [WRN]: [MODS_LoadSectionData:0129]: size 3112, addr = 00000000e1f00000. [WRN]: [MODS_LoadSectionData:0129]: size 103212, addr = 00000000e1f00c28. [WRN]: [MODS_LoadSectionData:0129]: size 35492, addr = 00000000e1f19f54. [WRN]: [MODS_LoadSectionData:0129]: size 2192, addr = 00000000e1f229f8. [WRN]: [MODS_LoadSectionData:0129]: size 5888, addr = 00000000e1f23288. [DBG]: [DESKTOP_MOpen:0091]: DESKTOP_MOpen. [DBG]: [LDR_LoadFile:0261]: filepath = d:\apps\init.axf. [WRN]: [MODS_LoadSectionData:0129]: size 552, addr = 00000000e1700000. [WRN]: [MODS_LoadSectionData:0129]: size 52936, addr = 00000000e1700228. [WRN]: [MODS_LoadSectionData:0129]: size 14248, addr = 00000000e170d0f0. [WRN]: [MODS_LoadSectionData:0129]: size 5912, addr = 00000000e1710898. [WRN]: [MODS_LoadSectionData:0129]: size 3304, addr = 00000000e1711fb0. Mod:d:\apps\desktop.mod Installed!, mod id=127 ...............Execute startup script end [DBG]: [msg_srv_init_key_channel:0163]: emit_ctr.h_keyGraber=0x40d62180 [DBG]: [msg_srv_init_key_channel:0174]: LdevID=0 [DBG]: [application_init_process:0856]: & application_init_process enter! & [WRN]: [power_open:0329]: power_timer start [DBG]: [application_init_process:0874]: application_init_process 874 before live_init [DBG]: [live_init:0054]: ~~~~~~~~~~~~~~before dsk_set_isn_charset~~~~~~~~~~~ [WRN]: [audio_play_init:0413]: [PLAY]audio_play_init,dev:0000000040125ef0 [WRN]: [audio_play_open:0575]: [PLAY]audio_play_open,dev:0000000040125ef0,0 [DBG]: [alsa_open_pcm:0316]: alsa open pcm! card:[audiocodec], pcmFlag:[1](0-cap;1-play) [DBG]: [application_init_process:0882]: application_init_process 882 before gscene_bgd_init [DBG]: [gscene_bgd_is_file_exist:0633]: file is exist:d:\apps\bg_default0.bgd [DBG]: [gscene_bgd_init:0143]: bgd_com->screen_size.width = 0 bgd_com->screen_size.height = 0 ftype = 1 [DBG]: [application_init_process:0907]: try to open /dev/hwsc failed! [DBG]: [application_init_process:0911]: application_init_process 911 before init_mainwin_create [WRN]: [init_mainwin_create:3361]: before GUI_ManWinCreate [WRN]: [init_mainwin_cb:2405]: Init_reg_para->poweroff:0 [WRN]: [init_mainwin_cb:2406]: init_ctr->autooff_timeout:0 [WRN]: [init_mainwin_cb:2407]: Init_reg_para->close_screen:0 [WRN]: [init_mainwin_cb:2408]: init_ctr->closescn_timeout:0 [WRN]: [init_dialog_uipara:0044]: ======get display size:width=0,height=0 [WRN]: [init_dialog_uipara:0163]: ===========800 X 480 dialog uipara [DBG]: [__hbar_layer_create:0107]: hbar fb 800 46 gui_dir=0 [DBG]: [__hbar_layer_create:0108]: hbar src 0 0 800 46 [DBG]: [__hbar_layer_create:0109]: hbar scn 0 0 800 46 [WRN]: [sunxi_keyboard_thread:0501]: filter invalid event packet! [WRN]: [key_msg_cb:0976]: +++++++++++++++++ GUI_MSG_KEY_DOWN [WRN]: [GUI_WinGetMsgQueue:2559]: h_win empty! [WRN]: [GUI_PostMessage:2212]: get windows msgqueue failed! [WRN]: [dsk_power_get_voltage_level:0153]: info.rest_vol=-1 [WRN]: [dsk_get_charge_state:0412]: in charge [DBG]: [reset_headbar_data:0287]: xxxxxx para->data.volume = 30 [DBG]: [reset_headbar_data:0291]: xxxxxx bright = 0 [DBG]: [init_mainwin_cb:2449]: try to open /dev/hwsc failed! [WRN]: [init_mainwin_create:3363]: after GUI_ManWinCreate [WRN]: [GUI_SetActiveManWin:0111]: active main win from no active to init. [WRN]: [GUI_SetActiveManWin:0122]: before GUI_WinLock [WRN]: [GUI_SetActiveManWin:0134]: before GUI_WinSetFocusChild [DBG]: [application_init_process:0917]: application_init_process 917 before _process_init [DBG]: [applet_info_manager_load_dir:0320]: find dir file d:\apps\desktop\app_root.desktop! [DBG]: [applet_info_manager_load_file:0280]: filename = d:\apps\desktop\app_root.desktop len=124 [WRN]: [activity_set_load_para:0666]: activity_set_load_para [WRN]: [activity_set_load_para:0682]: app_name=root [WRN]: [activity_set_load_para:0687]: src_name= [DBG]: [__activity_load_common:0408]: load application application://app_root. [DBG]: [LDR_LoadFile:0261]: filepath = d:\apps\app_root.axf. [WRN]: [MODS_LoadSectionData:0129]: size 419628, addr = 00000000e9200000. [WRN]: [MODS_LoadSectionData:0129]: size 128708, addr = 00000000e926672c. [WRN]: [MODS_LoadSectionData:0129]: size 84056, addr = 00000000e9285df0. [WRN]: [MODS_LoadSectionData:0129]: size 14700, addr = 00000000e929a648. [WRN]: [__activity_mainwin_create:0110]: create_info.hParent=40ebd1f8 [WRN]: [__activity_create:0139]: thiz->win=40ebd738 [DBG]: [app_home_create:0688]: ******** enter multi screen home application ************** [DBG]: [gscene_bgd_is_file_exist:0633]: file is exist:d:\apps\bg_default0.bgd [DBG]: [get_fb_from_file:0423]: filename=d:\apps\bg_default0.bgd [DBG]: [get_fb_from_file:0465]: bg pic is compress... [DBG]: [get_fb_from_file:0468]: compress_buf=413ef000 ===================================================================================================== EXC_LOAD_PAGE_FAULT ===================================================================================================== thread: initprocess, entry: 0x00000000e1701d48, stack_base: 0x0000000041046000,stack_size: 0x00010000. x0:0x0000000000000000 ra:0x00000000e170b506 sp:0x0000000041055360 gp:0x0000000040111864 tp:0x000000004020e340 t0:0x0000000000000001 t1:0x00000000400a6ec8 t2:0x0000000041509644 s0:0x8181818181818000 s1:0x00081818181416d5 a0:0x8181818181818181 a1:0x0000000000000466 a2:0x0000000000000001 a3:0x0000000000000008 a4:0x0000000000000001 a5:0x0000000000000000 a6:0x0000000000000320 a7:0x0000000010000201 s2:0x0000000040124af0 s3:0x0000000000119454 s5:0x0000000040124ae0 s5:0x8181818181818181 s6:0x0000000040143000 s7:0x00000000e170d1b0 s8:0x00000000e170d800 s9:0x000000000005dc00 s10:0x0000000040ef5740 s11:0x0000000000000001 t3:0x0000000000119454 t4:0x0000000000000004 t5:0x0000000000000008 t6:0x000000000000001f other: sepc :0x000000004002fec8 scause :0x000000000000000d stval :0x00000060a0648b54 sstatus :0x0000000200004120 sscratch:0x0000000000000000 -------backtrace----------- backtrace : 0X4002FEC8 backtrace : 0XE170B502 backtrace : 0XE1709A36 backtrace : 0XE1708414 backtrace : 0XE1708508 --------------------------- -----------------------------------------------TSK Usage Report---------------------------------------------------------- name errno entry stat prio tcb slice stacksize stkfree lt si so stack_range initbkhdle -2 0xe170521c running 24 0x4020ea78 15 2048 1592 15 0000 0000 [0x40dbd800-0x40dbe000] headbar_fresh 0 0xe17038f4 suspend 24 0x4020e898 15 8192 7560 15 0000 0000 [0x41312000-0x41314000] 0xE1F0D710 0 0xe1f0d710 suspend 24 0x4020e6b8 15 16384 15536 15 0000 0000 [0x40efd000-0x40f01000] appmsg2emitq 0 0xe1f0f6d4 suspend 9 0x4020e4d8 20 4096 3464 20 0000 0000 [0x41043000-0x41044000] initprocess 0 0xe1701d48 running 24 0x4020e2f8 15 65536 59184 05 0000 0000 [0x41046000-0x41056000] emitq2orange -2 0xe1f1101c running 24 0x4020e118 15 4096 2688 11 0000 0000 [0x41042000-0x41043000] OrangTmr 0 0xe1812e5e suspend 9 0x4020df38 20 4096 3544 20 0000 0000 [0x40eb7000-0x40eb8000] tshell 0 0x4009061e suspend 20 0x4020dd58 10 16384 12768 08 0000 0000 [0x40e19000-0x40e1d000] kb_input 0 0x40098c80 suspend 3 0x4020db78 10 4096 2248 09 0000 0000 [0x40e0f000-0x40e10000] 0x40039AFE 0 0x40039afe running 24 0x4020d7b8 15 4096 3248 08 0000 0000 [0x4026a000-0x4026b000] disp2 0 0x4002f41c suspend 15 0x4020d5d8 10 8192 7872 10 0000 0000 [0x402ad000-0x402af000] kmsg2appq 0 0x4009d6d2 suspend 6 0x4020d3f8 10 4096 3360 07 0000 0000 [0x40269000-0x4026a000] mnt_task 0 0x400c7826 suspend 7 0x4020d218 10 16384 15936 10 0000 0000 [0x40219000-0x4021d000] tidle 0 0x4002bbae running 31 0x4011e030 32 8192 7488 23 0000 0000 [0x4011e228-0x40120228] timer 0 0x4002f298 suspend 8 0x40120900 10 16384 16016 10 0000 0000 [0x40120ad8-0x40124ad8] ------------------------------------------------------------------------------------------------------------------------- memory info: Total 0x03ebd000 Used 0x011fb680 Max 0x01200a80 ------------------------------------------------memory information------------------------------------------------------- dump stack memory: 0x0000000041055360: 0xe170d800 0x00000000 0x0005dc00 0x00000000 0x0000000041055370: 0x414aa854 0x00000000 0x00000000 0x00000000 0x0000000041055380: 0x40253260 0x00000000 0x00119454 0x00000000 0x0000000041055390: 0x00000010 0x00000000 0x000000ff 0x00000000 0x00000000410553a0: 0x413ef000 0x00000000 0xe170b506 0x00000000 0x00000000410553b0: 0x00000010 0x00000000 0xe1709a3a 0x00000000 0x00000000410553c0: 0xe170d800 0x00000000 0x413ef000 0x00000000 0x00000000410553d0: 0xe170d1b0 0x00000000 0xe170b4ec 0x00000000 0x00000000410553e0: 0x410554e0 0x00000000 0x0005dc00 0x00000000 0x00000000410553f0: 0x0005dc00 0x00000000 0x413d1000 0x00000000 0x0000000041055400: 0x40ef57a4 0x00000000 0x00000001 0x00000000 0x0000000041055410: 0x00000002 0x00000000 0x00000001 0x00000000 0x0000000041055420: 0x00000320 0x00000000 0x000001e0 0x00000000 0x0000000041055430: 0x00010001 0x00000000 0x00000320 0x000001e0 0x0000000041055440: 0x413ef054 0x00000000 0x4144cc54 0x00000000 0x0000000041055450: 0x414aa854 0x00000000 0x00000001 0x00000000 0x0000000041055460: 0x00ff0110 0x00000000 0x00000000 0x00000000 0x0000000041055470: 0x00000000 0x00000000 0x00000002 0x00000000 0x0000000041055480: 0xdeadbeef 0x00000000 0xdeadbeef 0x00000000 0x0000000041055490: 0xdeadbeef 0x00000000 0xdeadbeef 0x00000000 0x00000000410554a0: 0xdeadbeef 0x00000000 0xdeadbeef 0x00000000 0x00000000410554b0: 0xdeadbeef 0x00000000 0xe1800000 0x00000000 0x00000000410554c0: 0x40ebd738 0x00000000 0x402b1178 0x00000000 0x00000000410554d0: 0x41055740 0x00000000 0x40ef5738 0x00000000 0x00000000410554e0: 0xe1712828 0x00000000 0xe1708418 0x00000000 0x00000000410554f0: 0x00000000 0x00000000 0x41055518 0x00000000 0x0000000041055500: 0x00000008 0x00000000 0xdeadbeef 0x00000000 0x0000000041055510: 0xdeadbeef 0x00000000 0x00e1f000 0x00000000 0x0000000041055520: 0x0000000a 0x00000000 0xe170850c 0x00000000 0x0000000041055530: 0x41055740 0x00000000 0x0000000a 0x00000000 0x0000000041055540: 0xe1700000 0x00000000 0xe9236fb0 0x00000000 0x0000000041055550: 0xe9266fd8 0x00000000 0xe9266fc8 0x00000000 dump epc memory: 0x000000004002fec8: 0x449b478b 0x8b8d4709 0x04e79463 0x818f90ef 0x000000004002fed8: 0x449b478b 0x000f5717 0xc3470713 0x7c27b58b 0x000000004002fee8: 0x578b8b8d 0x631c449b 0x00c59693 0x8f95e42e 0x000000004002fef8: 0x80efe31c 0x65a2ff9f 0x64068556 0x74e260a6 0x000000004002ff08: 0x79a27942 0x6ae27a02 0x61616b42 0xf2cff06f 0x000000004002ff18: 0x18078b63 0xfd1f80ef 0x478b89aa 0xb78b449b 0x000000004002ff28: 0x979b7c27 0x8c1d00c7 0x57b74018 0x879351ab 0x000000004002ff38: 0x0e631ab7 0x061300f7 0x05975a90 0x8593000a 0x000000004002ff48: 0x05175365 0x0513000a 0xd0ef6b65 0x781cd79f 0x000000004002ff58: 0x000f5717 0xbb870713 0x00fab023 0x5054631c 0x000000004002ff68: 0x03543823 0xe31c8f95 0x871b405c 0xc0580017 0x000000004002ff78: 0x5418eb99 0x000f5797 0xb9c78793 0x66e7c68b 0x000000004002ff88: 0xd40be814 0x404c66e7 0x5a634450 0x505402b6 0x000000004002ff98: 0x05178756 0x0513000a 0xd0ef4ee5 0x2423bf3f 0x000000004002ffa8: 0x445c0004 0x6406c05c 0x74e260a6 0x7a027942 0x000000004002ffb8: 0x6b426ae2 0x79a2854e 0x806f6161 0x441cf31f 0x000000004002ffc8: 0xc41c37fd 0x8e639fad 0x061300c7 0x05975f30 0x000000004002ffd8: 0x8593000a 0x05174a25 0x0513000a 0xd0ef5125 0x000000004002ffe8: 0x4058ce5f 0x10e3445c 0x681cfcf7 0x000f5497 0x000000004002fff8: 0xb2448493 0x541ce791 0x66f4c78b 0xfa8785e3 0x0000000040030008: 0xcf89441c 0x5ff00613 0x000a0597 0x46858593 0x0000000040030018: 0x000a0517 0x4a850513 0xcabfd0ef 0x970b541c 0x0000000040030028: 0xc78b06f4 0x986366f4 0x681c0687 0xe31c4589 0x0000000040030038: 0xc01c57fd 0x000f5797 0xd2478793 0x000f5717 0x0000000040030048: 0xd1470713 0x63104394 0x851be300 0xe8100016 0x0000000040030058: 0xdae3c388 0xc394f4a5 0x000a3783 0x3703e310 0x0000000040030068: 0x07b30009 0x83b140f4 0x04f7178b 0x000f5717 0x0000000040030078: 0xcf470713 0x47014314 0x02d74363 0x80ef854e 0x0000000040030088: 0x5797e6df 0x8793000f 0x438cce27 0x85226785 0x0000000040030098: 0x02f5c5bb 0x8713b59d 0x6b9c0107 0xd00bb769 0x00000000400300a8: 0x070544e7 0x60a6bfd1 0x74e26406 0x79a27942 0x00000000400300b8: 0x6ae27a02 0x61616b42 0x80828082 0x5797cd09
从打印的日志情况看,应该是还没有进行液晶初始化
其中ST7789_CPU 驱动文件中 LCD_cfg_panel_info 函数内容被注释掉了,我打开和关闭没一点反应
示波器量液晶数据引脚、时钟引脚、CS引脚始终没有波形
全志开发太难了,怎么配置如何配置的资料真实寥寥无几,几句话直接概括,问代理商的技术说他们也没有整过SST7789的液晶
-
@qq354813374 在 F133-A 驱动SST7789有没有人成功过 中说:
lcd_gpio_0 = <&pio PG 2 1 0 3 0>;
lcd_gpio_1 = <&pio PD 21 1 0 3 0>;pinctrl-0 = <&rgb8_pins_a>;
pinctrl-1 = <&rgb8_pins_b>;这个配置方法是Linux设备树的,你在melis里这样配置怎么可能被识别。
fex的语法与linux设备树的不一样,找错文档了
melis的配置方法:
;---------------------------------------------------------------------------------- ;lcd0 configuration ;lcd_if: 0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi ;lcd_x: lcd horizontal resolution ;lcd_y: lcd vertical resolution ;lcd_width: width of lcd in mm ;lcd_height: height of lcd in mm ;lcd_dclk_freq: in MHZ unit ;lcd_pwm_freq: in HZ unit ;lcd_pwm_pol: lcd backlight PWM polarity ;lcd_pwm_max_limit lcd backlight PWM max limit(<=255) ;lcd_hbp: hsync back porch ;lcd_ht: hsync total cycle ;lcd_vbp: vsync back porch ;lcd_vt: vysnc total cycle ;lcd_hspw: hsync plus width ;lcd_vspw: vysnc plus width ;lcd_lvds_if: 0:single link; 1:dual link ;lcd_lvds_colordepth: 0:8bit; 1:6bit ;lcd_lvds_mode: 0:NS mode; 1:JEIDA mode ;lcd_frm: 0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither ;lcd_io_phase: 0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase; ; 8~11bit:dclk phase; 12~15bit:de phase) ;lcd_gamma_en lcd gamma correction enable ;lcd_bright_curve_en lcd bright curve correction enable ;lcd_cmap_en lcd color map function enable ;deu_mode 0:smoll lcd screen; 1:large lcd screen(larger than 10inch) ;lcdgamma4iep: Smart Backlight parameter, lcd gamma vale * 10; ; decrease it while lcd is not bright enough; increase while lcd is too bright ;smart_color 90:normal lcd screen 65:retina lcd screen(9.7inch) ;---------------------------------------------------------------------------------- [lcd0] lcd_used = 1 lcd_driver_name = "st7789v_cpu" lcd_backlight = 150 lcd_if = 1 lcd_x = 240 lcd_y = 320 lcd_width = 108 lcd_height = 64 lcd_rb_swap = 0 lcd_dclk_freq = 18 lcd_pwm_used = 1 lcd_pwm_ch = 7 lcd_pwm_freq = 50000 lcd_pwm_pol = 1 lcd_hbp = 60 lcd_ht = 298 lcd_hspw = 30 lcd_vbp = 340 lcd_vt = 336 lcd_vspw = 2 lcd_lvds_if = 0 lcd_lvds_colordepth = 1 lcd_lvds_mode = 0 lcd_frm = 1 lcd_io_phase = 0x0000 lcd_gamma_en = 0 lcd_bright_curve_en = 0 lcd_cmap_en = 0 deu_mode = 0 lcdgamma4iep = 22 smart_color = 90 lcd_bl_en = port:PH06<1><0><default><1> lcd_power = port:power2<1><0><default><1> ;lcd_fsync_en =1 ;lcd_fsync_act_time = 1000 ;lcd_fsync_pol = 0 lcd_gpio_0 = port:PD00<2><0><default><default> lcd_gpio_1 = port:PD01<2><0><default><default> lcd_gpio_2 = port:PD02<2><0><default><default> lcd_gpio_3 = port:PD03<2><0><default><default> lcd_gpio_4 = port:PD04<2><0><default><default> lcd_gpio_5 = port:PD05<2><0><default><default> lcd_gpio_6 = port:PD06<2><0><default><default> lcd_gpio_7 = port:PD07<2><0><default><default> lcd_gpio_8 = port:PD08<2><0><default><default> lcd_gpio_9 = port:PD09<2><0><default><default> lcd_gpio_10 = port:PD10<2><0><default><default> lcd_gpio_11 = port:PD11<2><0><default><default> lcd_gpio_12 = port:PD12<2><0><default><default> lcd_gpio_13 = port:PD13<2><0><default><default> lcd_gpio_14 = port:PD14<2><0><default><default> lcd_gpio_15 = port:PD15<2><0><default><default> lcd_gpio_16 = port:PD16<2><0><default><default> lcd_gpio_17 = port:PD17<2><0><default><default> lcd_gpio_18 = port:PD18<2><0><default><default> lcd_gpio_19 = port:PD19<2><0><default><default> lcd_gpio_20 = port:PD20<2><0><default><default> lcd_gpio_21 = port:PD21<2><0><default><default> ;lcd_gpio_22 = port:PD22<2><0><default><default> ;lcd_gpio_23 = port:PD23<2><0><default><default> ;lcdclk = port:PD18<2><0><default><default> ;fsync = port:PD19<2><0><default><default> ;lcdhs = port:PD20<2><0><default><default> ;lcdvs = port:PD21<2><0><default><default>
在Linux上已经驱动过st7789v i80屏幕,melis平台理论上是一样的操作。
#include "st7789v_cpu.h" #define CPU_TRI_MODE #define DBG_INFO(format, args...) // (printk("[ST7789V LCD INFO] LINE:%04d-->%s:"format, __LINE__, __func__, ##args)) #define DBG_ERR(format, args...) // (printk("[ST7789V LCD ERR] LINE:%04d-->%s:"format, __LINE__, __func__, ##args)) #define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 0, val) #define lcd_cs(val) sunxi_lcd_gpio_set_value(sel, 1, val) static void lcd_panel_st7789v_init(u32 sel, struct disp_panel_para *info); static void LCD_power_on(u32 sel); static void LCD_power_off(u32 sel); static void LCD_bl_open(u32 sel); static void LCD_bl_close(u32 sel); static void LCD_panel_init(u32 sel); static void LCD_panel_exit(u32 sel); extern void tcon_reset(u32 sel); /** * @name :lcd_esd_check * @brief :check if panel is ok * @param[IN] :sel:index of dsi * @param[OUT] :none * @return :0 if ok, else not ok */ static s32 lcd_esd_check(u32 sel) { // pr_info("[lcd_esd_check] %d\n", sel); tcon_reset(sel); return 0; } static void LCD_cfg_panel_info(struct panel_extend_para *info) { return; } static s32 LCD_open_flow(u32 sel) { LCD_OPEN_FUNC(sel, LCD_power_on, 120); #ifdef CPU_TRI_MODE LCD_OPEN_FUNC(sel, LCD_panel_init, 100); LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 50); #else LCD_OPEN_FUNC(sel, sunxi_lcd_tcon_enable, 100); LCD_OPEN_FUNC(sel, LCD_panel_init, 50); #endif LCD_OPEN_FUNC(sel, LCD_bl_open, 0); return 0; } static s32 LCD_close_flow(u32 sel) { LCD_CLOSE_FUNC(sel, LCD_bl_close, 20); #ifdef CPU_TRI_MODE LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 10); LCD_CLOSE_FUNC(sel, LCD_panel_exit, 50); #else LCD_CLOSE_FUNC(sel, LCD_panel_exit, 10); LCD_CLOSE_FUNC(sel, sunxi_lcd_tcon_disable, 10); #endif LCD_CLOSE_FUNC(sel, LCD_power_off, 0); return 0; } static void LCD_power_on(u32 sel) { /*config lcd_power pin to open lcd power0 */ sunxi_lcd_power_enable(sel, 0); sunxi_lcd_pin_cfg(sel, 1); } static void LCD_power_off(u32 sel) { /*lcd_cs, active low */ lcd_cs(1); sunxi_lcd_delay_ms(10); /*lcd_rst, active hight */ panel_reset(1); sunxi_lcd_delay_ms(10); panel_reset(0); sunxi_lcd_delay_ms(10); panel_reset(1); // sunxi_lcd_delay_ms(20); sunxi_lcd_pin_cfg(sel, 0); /*config lcd_power pin to close lcd power0 */ sunxi_lcd_power_disable(sel, 0); } static void LCD_bl_open(u32 sel) { sunxi_lcd_pwm_enable(sel); /*config lcd_bl_en pin to open lcd backlight */ sunxi_lcd_backlight_enable(sel); } static void LCD_bl_close(u32 sel) { /*config lcd_bl_en pin to close lcd backlight */ sunxi_lcd_backlight_disable(sel); sunxi_lcd_pwm_disable(sel); } /*static int bootup_flag = 0;*/ static void LCD_panel_init(u32 sel) { struct disp_panel_para *info = kmalloc(sizeof(struct disp_panel_para), GFP_KERNEL); DBG_INFO("\n"); bsp_disp_get_panel_info(sel, info); lcd_panel_st7789v_init(sel, info); kfree(info); return; } static void LCD_panel_exit(u32 sel) { sunxi_lcd_cpu_write_index(0, 0x28); sunxi_lcd_cpu_write_index(0, 0x10); } static void lcd_panel_st7789v_init(u32 sel, struct disp_panel_para *info) { DBG_INFO("\n"); /*lcd_cs, active low */ lcd_cs(0); sunxi_lcd_delay_ms(1); panel_reset(1); sunxi_lcd_delay_ms(2); panel_reset(0); sunxi_lcd_delay_ms(2); panel_reset(1); sunxi_lcd_delay_ms(2); sunxi_lcd_cpu_write_index(0, 0x11); sunxi_lcd_delay_ms(12); sunxi_lcd_cpu_write_index(0, 0x36); sunxi_lcd_cpu_write_data( 0, 0x00); sunxi_lcd_cpu_write_index(0, 0x3A); sunxi_lcd_cpu_write_data( 0, 0x05); /* RGB565 */ sunxi_lcd_cpu_write_index(0, 0xB2); sunxi_lcd_cpu_write_data( 0, 0x0C); sunxi_lcd_cpu_write_data( 0, 0x0C); sunxi_lcd_cpu_write_data( 0, 0x00); sunxi_lcd_cpu_write_data( 0, 0x33); sunxi_lcd_cpu_write_data( 0, 0x33); sunxi_lcd_cpu_write_index(0, 0xB7); sunxi_lcd_cpu_write_data( 0, 0x70); /*ST7789V Power setting */ sunxi_lcd_cpu_write_index(0, 0xBB); sunxi_lcd_cpu_write_data( 0, 0x35); sunxi_lcd_cpu_write_index(0, 0xC2); sunxi_lcd_cpu_write_data( 0, 0x01); sunxi_lcd_cpu_write_index(0, 0xC3); sunxi_lcd_cpu_write_data( 0, 0xaf); sunxi_lcd_cpu_write_index(0, 0xC4); sunxi_lcd_cpu_write_data( 0, 0x20); sunxi_lcd_cpu_write_index(0, 0xC6); sunxi_lcd_cpu_write_data( 0, 0x0F); sunxi_lcd_cpu_write_index(0, 0xD0); sunxi_lcd_cpu_write_data( 0, 0xA4); sunxi_lcd_cpu_write_data( 0, 0xA1); // /*ST7789V gamma setting */ sunxi_lcd_cpu_write_index(0, 0xE0); sunxi_lcd_cpu_write_data( 0, 0xD0); sunxi_lcd_cpu_write_data( 0, 0x08); sunxi_lcd_cpu_write_data( 0, 0x0E); sunxi_lcd_cpu_write_data( 0, 0x09); sunxi_lcd_cpu_write_data( 0, 0x09); sunxi_lcd_cpu_write_data( 0, 0x05); sunxi_lcd_cpu_write_data( 0, 0x31); sunxi_lcd_cpu_write_data( 0, 0x33); sunxi_lcd_cpu_write_data( 0, 0x48); sunxi_lcd_cpu_write_data( 0, 0x17); sunxi_lcd_cpu_write_data( 0, 0x14); sunxi_lcd_cpu_write_data( 0, 0x15); sunxi_lcd_cpu_write_data( 0, 0x31); sunxi_lcd_cpu_write_data( 0, 0x34); sunxi_lcd_cpu_write_index(0, 0xE1); sunxi_lcd_cpu_write_data( 0, 0xD0); sunxi_lcd_cpu_write_data( 0, 0x08); sunxi_lcd_cpu_write_data( 0, 0x0E); sunxi_lcd_cpu_write_data( 0, 0x09); sunxi_lcd_cpu_write_data( 0, 0x09); sunxi_lcd_cpu_write_data( 0, 0x15); sunxi_lcd_cpu_write_data( 0, 0x31); sunxi_lcd_cpu_write_data( 0, 0x33); sunxi_lcd_cpu_write_data( 0, 0x48); sunxi_lcd_cpu_write_data( 0, 0x17); sunxi_lcd_cpu_write_data( 0, 0x14); sunxi_lcd_cpu_write_data( 0, 0x15); sunxi_lcd_cpu_write_data( 0, 0x31); sunxi_lcd_cpu_write_data( 0, 0x34); sunxi_lcd_cpu_write_index(0, 0xd6); sunxi_lcd_cpu_write_data( 0, 0xa1); #if 0 //defined(CPU_TRI_MODE) /* enable te, mode 0 */ sunxi_lcd_cpu_write_index(0, 0x35); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_index(0, 0x44); sunxi_lcd_cpu_write_data(0, 0x00); sunxi_lcd_cpu_write_data(0, 0x80); #endif sunxi_lcd_cpu_write_index(0, 0x29); if(strcmp(info->lcd_model_name, "inv") == 0x00) { sunxi_lcd_cpu_write_index(0, 0x21); } else { sunxi_lcd_cpu_write_index(0, 0x20); } u16 x = 0, y = 0,w = 0, h = 0; if(strcmp(info->lcd_size, "1.3") == 0) { x = 0; y = 0; w = 240 - 1; h = 240 - 1; } else if (strcmp(info->lcd_size, "2.0") == 0) { /* 2.4 */ // sunxi_lcd_cpu_write_index(0, 0x36); // sunxi_lcd_cpu_write_data( 0, 0xA0); x = 0; y = 0; w = 240 - 1; h = 320 - 1; } else { /* 2.4 */ x = 0; y = 0; w = 240 - 1; h = 320 - 1; } /* set to 240x240 */ sunxi_lcd_cpu_write_index(0, 0x2a); sunxi_lcd_cpu_write_data(0, (u8)(x>>8)); sunxi_lcd_cpu_write_data(0, (u8)(x)); sunxi_lcd_cpu_write_data(0, (u8)(w>>8)); sunxi_lcd_cpu_write_data(0, (u8)(w)); sunxi_lcd_cpu_write_index(0, 0x2b); sunxi_lcd_cpu_write_data(0, (u8)(y>>8)); sunxi_lcd_cpu_write_data(0, (u8)(y)); sunxi_lcd_cpu_write_data(0, (u8)(h>>8)); sunxi_lcd_cpu_write_data(0, (u8)(h)); sunxi_lcd_cpu_write_index(0, 0x2c); } /* panel driver name, must mach the name of lcd_drv_name in sys_config.fex */ struct __lcd_panel st7789v_cpu_panel = { .name = "st7789v_cpu", .func = { .cfg_panel_info = LCD_cfg_panel_info, .cfg_open_flow = LCD_open_flow, .cfg_close_flow = LCD_close_flow, }, };
-
@qq354813374 居然是melis,不错。搞完我也试试。melis帖子太少了
-
@whycanservice
按照你说的方式进行配置,现在WR有时钟信号,CS也有信号但是不对,RS也有但是也不对
-
@qq354813374 按照屏幕实际调整就好了
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号