页次: 1
@Gentlepig
我改动是下面代码里面panel_x panel_y哪里xy交换,这个是和硬件相关的
static void test_draw_a_point(u32 cnt, struct aic_rtp_event *e,
calibration *cal)
{
u32 pos = 0;
u8 *buf = NULL;
int panel_x = 0;
int panel_y = 0;
int a[7] = {0};
u8 rate = g_fb_info.bits_per_pixel / AIC_BITS_TO_BYTE_RATE;
panel_x = AIC_RTP_MAX_VAL - e->y; // ls x<->y //
panel_y = AIC_RTP_MAX_VAL - e->x; // ls x<->y //
panel_x = (panel_x * g_fb_info.width) / AIC_RTP_MAX_VAL;
panel_y = (panel_y * g_fb_info.height) / AIC_RTP_MAX_VAL;
@老鸟kkk
请问你是用官方的BSP重新编译bootload的么, 我试了用原先自带的bootload.bin可以正常启动APP 重新编译了bootload后 就会报错
Pre-Boot Program ... (2023-11-14 13:46:14)
SPINOR
tinySPL (LDO11_LDO18 ON) [Built on Jan 4 2024 14:50:59]
[W] usbh_get_connect_id()107 usb 0 port change wait failed.
[E] main()137 Not find udisk.
qspi0 freq (input): 100000000Hz
qspi0 freq ( bus ): 50000000Hz
qspi0 freq ( bus ): 100000000Hz
Not found FIT
114913 : Run APP
D133芯片 使用外部的1.1V和1.8V可以正常下载启动运行。想使用内部LDO的1.8V 1.1V. boot代码已经开启1.1和1.8V的配置app里面也开启了。
重新编译后,下载到芯片内启动SPL后无法启动APP显示Not FOUND FIT, 就卡住了,是什么问题?
Pre-Boot Program ... (2023-11-14 13:46:14)
SPINOR
tinySPL (LDO11_LDO18 ON) [Built on Jan 4 2024 14:50:59]
[W] usbh_get_connect_id()107 usb 0 port change wait failed.
[E] main()137 Not find udisk.
qspi0 freq (input): 100000000Hz
qspi0 freq ( bus ): 50000000Hz
qspi0 freq ( bus ): 100000000Hz
Not found FIT
114913 : Run APP
你这个是 编译内核和应用的 menuconfig里的把。 使用的boot好像是个bin,需要把哪个boot的bin重新做个。
参考 :
我的是只用了3.3V供电,其他的是用的内置的ldo电源,用的nor flash。根据官方的说法要先把config配置成bootloader,然后在bootloader的menuconfig中把1.1和1.8的电源使能输出(默认1.1有1.2V输出,1.8没有输出),根据手册1.1V和1.8V的寄存器值应设为4和3,然后编译;接下来把config配置成app的,同理配置1.1和1.8电源后再编译,按他们的说法打包镜像的时候会自动去找前面编译好的bootloader一起打包。
举个例子:
在luban-lite下使用env:scons --apply-def=2 ---> scons --menuconfig配置ldo输出 --->编译;scons --apply-def=3 ---> scons --menuconfig配置ldo输出 --->编译,然后就可以烧录镜像了
调屏不难,MCU做过很多。使用这个芯片的库和一些驱动,需要看下。主要是手上屏幕没有这么多种。
前面烧录都正常,今天发现烧录不对,Aiburn显示成功,但是log里面有错误,实际上img也没有烧录进去,还是旧的。
看看是什么问题?
[debug] [2023-12-20 12:41:08] Software Version: "1.0.8"
[debug] [2023-12-20 12:41:08] Machine Name: "123[img]https://whycan.com/files/members/5326/err.jpg[/img][img]https://whycan.com/files/members/5326/err.jpg[/img]"
[debug] [2023-12-20 12:41:08] System Name: "Windows 10 (10.0)"
[debug] [2023-12-20 12:41:08] CPU Architecture: "x86_64"
[debug] [2023-12-20 12:41:08] Parse the image header from "E:/ArtinChip/luban-lite/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:41:08] Soc type: "d13x"
[debug] [2023-12-20 12:41:08] Board type: "demo88-nor"
[debug] [2023-12-20 12:41:08] Image version: "1.0.0"
[debug] [2023-12-20 12:41:08] Storage type: "spi-nor"
[debug] [2023-12-20 12:41:08] Storage ID: ""
[debug] [2023-12-20 12:41:08] Meta count: "4"
[debug] [2023-12-20 12:41:08] Refresh the partition tree ...
[debug] [2023-12-20 12:41:08] Part name: image.target.spl , size: 125968
[debug] [2023-12-20 12:41:08] Part name: image.target.os , size: 122320
[debug] [2023-12-20 12:41:08] Current connect type: 0
[debug] [2023-12-20 12:41:08] No device available
[debug] [2023-12-20 12:41:12] Current file path: "E:/ArtinChip/luban-lite/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:41:30] Parse the image header from "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:41:30] Soc type: "d13x"
[debug] [2023-12-20 12:41:30] Board type: "demo88-nor"
[debug] [2023-12-20 12:41:30] Image version: "1.0.0"
[debug] [2023-12-20 12:41:30] Storage type: "spi-nor"
[debug] [2023-12-20 12:41:30] Storage ID: ""
[debug] [2023-12-20 12:41:30] Meta count: "4"
[debug] [2023-12-20 12:41:30] Refresh the partition tree ...
[debug] [2023-12-20 12:41:30] Part name: image.target.spl , size: 96272
[debug] [2023-12-20 12:41:30] Part name: image.target.os , size: 96784
[debug] [2023-12-20 12:41:38] WinEvent: Some devnode changed
[debug] [2023-12-20 12:41:38] There are "1" device available
[debug] [2023-12-20 12:41:38] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:41:38] Try to get Usb device hd info...
[debug] [2023-12-20 12:41:38] Boot device1: "0"
[debug] [2023-12-20 12:41:38] Boot device2: "0"
[debug] [2023-12-20 12:41:38] The status of ArtInChip device: true
[debug] [2023-12-20 12:41:38] WinEvent: Some devnode changed
[debug] [2023-12-20 12:41:38] There are "1" device available
[debug] [2023-12-20 12:41:50] Start burn online ...
[debug] [2023-12-20 12:41:50] Progress range: 0 ~ 294912
[debug] [2023-12-20 12:41:50] Burn Image file "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:41:50] Meta 0 image.updater.spl , size 96272 ...
[debug] [2023-12-20 12:41:50] Blocksize 4 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:41:50] Offset: 4096 Size: 96272
[debug] [2023-12-20 12:41:50] Dev "1:3" Send the rest data 96272
[error] [2023-12-20 12:41:51] aicupg_trans_recv_pkt()208: CSW size 0, Pipe error(-9)
[error] [2023-12-20 12:41:51] aicupg_cmd_send_fwc_data_final()704: Recv resp failed, expect 16, got 0
[debug] [2023-12-20 12:41:51] Don't check the result of image.updater.spl
[debug] [2023-12-20 12:41:51] Meta 1 image.info , size 2048 ...
[error] [2023-12-20 12:41:51] aicupg_trans_send_pkt()80: CBW tag 0x41, size 0, Input/Output Error(-1)
[error] [2023-12-20 12:41:51] aicupg_cmd_get_hwinfo()85: Send command failed. ret = 0, siz = 16
[debug] [2023-12-20 12:41:51] Wait to reconnect dev "1:3"
[debug] [2023-12-20 12:41:51] QTime("12:41:51.210") Wait for Dev "1:3" ready
[debug] [2023-12-20 12:41:51] WinEvent: Some devnode changed
[debug] [2023-12-20 12:41:51] WinEvent: Some devnode changed
[warn ] [2023-12-20 12:41:51] Set upg work mode: 0
[debug] [2023-12-20 12:41:51] WinEvent: Some devnode changed
[debug] [2023-12-20 12:41:51] Blocksize 1 , chunk 1048576 * 0 , rest 2048
[debug] [2023-12-20 12:41:51] Offset: 0 Size: 2048
[debug] [2023-12-20 12:41:51] Dev "1:3" Send the rest data 2048
[debug] [2023-12-20 12:41:51] Meta 2 image.target.spl , size 96272 ...
[debug] [2023-12-20 12:41:51] Blocksize 2048 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:41:51] Offset: 102400 Size: 96272
[debug] [2023-12-20 12:41:51] Dev "1:3" Send the rest data 98304
[debug] [2023-12-20 12:41:51] Meta 3 image.target.os , size 96784 ...
[debug] [2023-12-20 12:41:51] Blocksize 2048 , chunk 1048576 * 0 , rest 96784
[debug] [2023-12-20 12:41:51] Offset: 200704 Size: 96784
[debug] [2023-12-20 12:41:51] Dev "1:3" Send the rest data 98304
[warn ] [2023-12-20 12:41:51] Invalid progress position: "294928"
[debug] [2023-12-20 12:41:51] Burn online successfully!
[debug] [2023-12-20 12:41:51] Update "success_cnt" of "2023-12-20"
[debug] [2023-12-20 12:42:21] Current connect type: 1
[debug] [2023-12-20 12:42:21] Release usb resource
[debug] [2023-12-20 12:42:21] Scan the available Serial Device ...
[debug] [2023-12-20 12:42:21] Current serial dev: "COM4"
[debug] [2023-12-20 12:42:21] " COM4"
[debug] [2023-12-20 12:42:31] WinEvent: Some devnode changed
[debug] [2023-12-20 12:42:31] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:42:31] Try to connect "COM4"
[warn ] [2023-12-20 12:42:31] Cannot find ArtInChip device in "COM4"
[debug] [2023-12-20 12:42:31] The status of ArtInChip device: false
[debug] [2023-12-20 12:42:32] WinEvent: Some devnode changed
[error] [2023-12-20 12:42:32] uart_conn_mgr_thread()431: uart_conn_mgr_thread: Got 00
[error] [2023-12-20 12:42:32] uart_conn_mgr_thread()431: uart_conn_mgr_thread: Got C0
[debug] [2023-12-20 12:43:05] Current file path: "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:43:06] Parse the image header from "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:43:06] Soc type: "d13x"
[debug] [2023-12-20 12:43:06] Board type: "demo88-nor"
[debug] [2023-12-20 12:43:06] Image version: "1.0.0"
[debug] [2023-12-20 12:43:06] Storage type: "spi-nor"
[debug] [2023-12-20 12:43:06] Storage ID: ""
[debug] [2023-12-20 12:43:06] Meta count: "4"
[debug] [2023-12-20 12:43:06] Refresh the partition tree ...
[debug] [2023-12-20 12:43:06] Part name: image.target.spl , size: 96272
[debug] [2023-12-20 12:43:06] Part name: image.target.os , size: 96784
[error] [2023-12-20 12:43:09] uart_conn_mgr_thread()431: uart_conn_mgr_thread: Got 00
[debug] [2023-12-20 12:43:09] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:12] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:12] WinEvent: Some devnode changed
[error] [2023-12-20 12:43:14] uart_conn_mgr_thread()431: uart_conn_mgr_thread: Got 00
[debug] [2023-12-20 12:43:18] Current connect type: 0
[debug] [2023-12-20 12:43:18] There are "1" device available
[debug] [2023-12-20 12:43:18] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:43:18] Try to get Usb device hd info...
[debug] [2023-12-20 12:43:18] Boot device1: "0"
[debug] [2023-12-20 12:43:18] Boot device2: "0"
[debug] [2023-12-20 12:43:18] The status of ArtInChip device: true
[debug] [2023-12-20 12:43:22] Release Serial resource
[debug] [2023-12-20 12:43:23] Current connect type: 1
[debug] [2023-12-20 12:43:23] Release usb resource
[debug] [2023-12-20 12:43:23] Scan the available Serial Device ...
[debug] [2023-12-20 12:43:23] Current serial dev: ""
[debug] [2023-12-20 12:43:23] Current serial dev: "COM4"
[debug] [2023-12-20 12:43:24] Start burn online ...
[debug] [2023-12-20 12:43:24] Progress range: 0 ~ 294912
[debug] [2023-12-20 12:43:24] Burn Image file "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:43:24] Try to connect ""
[error] [2023-12-20 12:43:24] libuart_open()520: Failed to open COM device.
[warn ] [2023-12-20 12:43:24] Failed to open ""
[error] [2023-12-20 12:43:24] Failed to open ArtInChip device
[debug] [2023-12-20 12:43:24] Update "fail_cnt" of "2023-12-20"
[debug] [2023-12-20 12:43:33] Current connect type: 0
[debug] [2023-12-20 12:43:33] Release Serial resource
[debug] [2023-12-20 12:43:33] There are "1" device available
[debug] [2023-12-20 12:43:33] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:43:33] Try to get Usb device hd info...
[debug] [2023-12-20 12:43:33] Boot device1: "0"
[debug] [2023-12-20 12:43:33] Boot device2: "0"
[debug] [2023-12-20 12:43:33] The status of ArtInChip device: true
[debug] [2023-12-20 12:43:35] Start burn online ...
[debug] [2023-12-20 12:43:35] Progress range: 0 ~ 294912
[debug] [2023-12-20 12:43:35] Burn Image file "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:43:35] Meta 0 image.updater.spl , size 96272 ...
[debug] [2023-12-20 12:43:35] Blocksize 4 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:43:35] Offset: 4096 Size: 96272
[debug] [2023-12-20 12:43:35] Dev "1:3" Send the rest data 96272
[error] [2023-12-20 12:43:35] aicupg_trans_recv_pkt()208: CSW size 0, Pipe error(-9)
[error] [2023-12-20 12:43:35] aicupg_cmd_send_fwc_data_final()704: Recv resp failed, expect 16, got 0
[debug] [2023-12-20 12:43:35] Don't check the result of image.updater.spl
[debug] [2023-12-20 12:43:35] Meta 1 image.info , size 2048 ...
[error] [2023-12-20 12:43:35] aicupg_trans_send_pkt()80: CBW tag 0xb9, size 0, Input/Output Error(-1)
[error] [2023-12-20 12:43:35] aicupg_cmd_get_hwinfo()85: Send command failed. ret = 0, siz = 16
[debug] [2023-12-20 12:43:35] Wait to reconnect dev "1:3"
[debug] [2023-12-20 12:43:35] QTime("12:43:35.710") Wait for Dev "1:3" ready
[debug] [2023-12-20 12:43:35] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:35] WinEvent: Some devnode changed
[warn ] [2023-12-20 12:43:35] Set upg work mode: 0
[debug] [2023-12-20 12:43:35] Blocksize 1 , chunk 1048576 * 0 , rest 2048
[debug] [2023-12-20 12:43:35] Offset: 0 Size: 2048
[debug] [2023-12-20 12:43:35] Dev "1:3" Send the rest data 2048
[debug] [2023-12-20 12:43:35] Meta 2 image.target.spl , size 96272 ...
[debug] [2023-12-20 12:43:36] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:36] Blocksize 2048 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:43:36] Offset: 102400 Size: 96272
[debug] [2023-12-20 12:43:36] Dev "1:3" Send the rest data 98304
[debug] [2023-12-20 12:43:36] Meta 3 image.target.os , size 96784 ...
[debug] [2023-12-20 12:43:36] Blocksize 2048 , chunk 1048576 * 0 , rest 96784
[debug] [2023-12-20 12:43:36] Offset: 200704 Size: 96784
[debug] [2023-12-20 12:43:36] Dev "1:3" Send the rest data 98304
[warn ] [2023-12-20 12:43:36] Invalid progress position: "294928"
[debug] [2023-12-20 12:43:36] Burn online successfully!
[debug] [2023-12-20 12:43:36] Reboot the device ...
[error] [2023-12-20 12:43:36] aicupg_trans_recv_pkt()182: CBW size 0, Pipe error(-9)
[debug] [2023-12-20 12:43:36] Update "success_cnt" of "2023-12-20"
[debug] [2023-12-20 12:43:36] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:36] No device available
[debug] [2023-12-20 12:43:37] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:37] No device available
[debug] [2023-12-20 12:43:38] WinEvent: Some devnode changed
[debug] [2023-12-20 12:43:38] No device available
[debug] [2023-12-20 12:44:18] WinEvent: Some devnode changed
[debug] [2023-12-20 12:44:18] There are "1" device available
[debug] [2023-12-20 12:44:18] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:44:18] Try to get Usb device hd info...
[debug] [2023-12-20 12:44:18] WinEvent: Some devnode changed
[debug] [2023-12-20 12:44:18] Boot device1: "0"
[debug] [2023-12-20 12:44:18] Boot device2: "0"
[debug] [2023-12-20 12:44:18] There are "1" device available
[debug] [2023-12-20 12:44:18] The status of ArtInChip device: true
[debug] [2023-12-20 12:44:56] Start burn online ...
[debug] [2023-12-20 12:44:56] Progress range: 0 ~ 294912
[debug] [2023-12-20 12:44:56] Burn Image file "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:44:56] Meta 0 image.updater.spl , size 96272 ...
[debug] [2023-12-20 12:44:56] Blocksize 4 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:44:56] Offset: 4096 Size: 96272
[debug] [2023-12-20 12:44:56] Dev "1:3" Send the rest data 96272
[error] [2023-12-20 12:44:57] aicupg_trans_recv_pkt()208: CSW size 0, Pipe error(-9)
[error] [2023-12-20 12:44:57] aicupg_cmd_send_fwc_data_final()704: Recv resp failed, expect 16, got 0
[debug] [2023-12-20 12:44:57] Don't check the result of image.updater.spl
[debug] [2023-12-20 12:44:57] Meta 1 image.info , size 2048 ...
[error] [2023-12-20 12:44:57] aicupg_trans_send_pkt()80: CBW tag 0x132, size 0, Input/Output Error(-1)
[error] [2023-12-20 12:44:57] aicupg_cmd_get_hwinfo()85: Send command failed. ret = 0, siz = 16
[debug] [2023-12-20 12:44:57] Wait to reconnect dev "1:3"
[debug] [2023-12-20 12:44:57] QTime("12:44:57.542") Wait for Dev "1:3" ready
[debug] [2023-12-20 12:44:57] WinEvent: Some devnode changed
[debug] [2023-12-20 12:44:57] WinEvent: Some devnode changed
[debug] [2023-12-20 12:44:57] WinEvent: Some devnode changed
[warn ] [2023-12-20 12:44:57] Set upg work mode: 0
[debug] [2023-12-20 12:44:57] Blocksize 1 , chunk 1048576 * 0 , rest 2048
[debug] [2023-12-20 12:44:57] Offset: 0 Size: 2048
[debug] [2023-12-20 12:44:57] Dev "1:3" Send the rest data 2048
[debug] [2023-12-20 12:44:57] Meta 2 image.target.spl , size 96272 ...
[debug] [2023-12-20 12:44:57] Blocksize 2048 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:44:57] Offset: 102400 Size: 96272
[debug] [2023-12-20 12:44:57] Dev "1:3" Send the rest data 98304
[debug] [2023-12-20 12:44:57] Meta 3 image.target.os , size 96784 ...
[debug] [2023-12-20 12:44:57] Blocksize 2048 , chunk 1048576 * 0 , rest 96784
[debug] [2023-12-20 12:44:57] Offset: 200704 Size: 96784
[debug] [2023-12-20 12:44:57] Dev "1:3" Send the rest data 98304
[warn ] [2023-12-20 12:44:57] Invalid progress position: "294928"
[debug] [2023-12-20 12:44:57] Burn online successfully!
[debug] [2023-12-20 12:44:57] Reboot the device ...
[error] [2023-12-20 12:44:57] aicupg_trans_recv_pkt()182: CBW size 0, Pipe error(-9)
[debug] [2023-12-20 12:44:58] Update "success_cnt" of "2023-12-20"
[debug] [2023-12-20 12:44:58] WinEvent: Some devnode changed
[debug] [2023-12-20 12:44:58] No device available
[debug] [2023-12-20 12:45:32] Try to scan the current disk device ...
[debug] [2023-12-20 12:45:37] No device available
[debug] [2023-12-20 12:45:46] Http request: http://aitestserver.artmem.com:8080/api/get_last_version?app_id=1
[error] [2023-12-20 12:45:46] Http request error: QNetworkReply::HostNotFoundError
[debug] [2023-12-20 12:45:49] Http request: http://aitestserver.artmem.com:8080/api/get_last_version?app_id=1
[error] [2023-12-20 12:45:49] Http request error: QNetworkReply::HostNotFoundError
[debug] [2023-12-20 12:45:50] Http request: http://aitestserver.artmem.com:8080/api/get_last_version?app_id=1
[error] [2023-12-20 12:45:50] Http request error: QNetworkReply::HostNotFoundError
[debug] [2023-12-20 12:46:06] WinEvent: Some devnode changed
[debug] [2023-12-20 12:46:06] There are "1" device available
[debug] [2023-12-20 12:46:06] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:46:06] WinEvent: Some devnode changed
[debug] [2023-12-20 12:46:06] Try to get Usb device hd info...
[debug] [2023-12-20 12:46:06] Boot device1: "0"
[debug] [2023-12-20 12:46:06] Boot device2: "0"
[debug] [2023-12-20 12:46:06] There are "1" device available
[debug] [2023-12-20 12:46:06] The status of ArtInChip device: true
[debug] [2023-12-20 12:46:07] Start burn online ...
[debug] [2023-12-20 12:46:07] Progress range: 0 ~ 294912
[debug] [2023-12-20 12:46:07] Burn Image file "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:46:07] Meta 0 image.updater.spl , size 96272 ...
[debug] [2023-12-20 12:46:07] Blocksize 4 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:46:07] Offset: 4096 Size: 96272
[debug] [2023-12-20 12:46:07] Dev "1:3" Send the rest data 96272
[error] [2023-12-20 12:46:08] aicupg_trans_recv_pkt()208: CSW size 0, Pipe error(-9)
[error] [2023-12-20 12:46:08] aicupg_cmd_send_fwc_data_final()704: Recv resp failed, expect 16, got 0
[debug] [2023-12-20 12:46:08] Don't check the result of image.updater.spl
[debug] [2023-12-20 12:46:08] Meta 1 image.info , size 2048 ...
[error] [2023-12-20 12:46:08] aicupg_trans_send_pkt()80: CBW tag 0x1ab, size 0, Input/Output Error(-1)
[error] [2023-12-20 12:46:08] aicupg_cmd_get_hwinfo()85: Send command failed. ret = 0, siz = 16
[debug] [2023-12-20 12:46:08] Wait to reconnect dev "1:3"
[debug] [2023-12-20 12:46:08] QTime("12:46:08.186") Wait for Dev "1:3" ready
[debug] [2023-12-20 12:46:08] WinEvent: Some devnode changed
[debug] [2023-12-20 12:46:08] WinEvent: Some devnode changed
[warn ] [2023-12-20 12:46:08] Set upg work mode: 0
[debug] [2023-12-20 12:46:08] WinEvent: Some devnode changed
[debug] [2023-12-20 12:46:08] Blocksize 1 , chunk 1048576 * 0 , rest 2048
[debug] [2023-12-20 12:46:08] Offset: 0 Size: 2048
[debug] [2023-12-20 12:46:08] Dev "1:3" Send the rest data 2048
[debug] [2023-12-20 12:46:08] Meta 2 image.target.spl , size 96272 ...
[debug] [2023-12-20 12:46:08] Blocksize 2048 , chunk 1048576 * 0 , rest 96272
[debug] [2023-12-20 12:46:08] Offset: 102400 Size: 96272
[debug] [2023-12-20 12:46:08] Dev "1:3" Send the rest data 98304
[debug] [2023-12-20 12:46:08] Meta 3 image.target.os , size 96784 ...
[debug] [2023-12-20 12:46:08] Blocksize 2048 , chunk 1048576 * 0 , rest 96784
[debug] [2023-12-20 12:46:08] Offset: 200704 Size: 96784
[debug] [2023-12-20 12:46:08] Dev "1:3" Send the rest data 98304
[warn ] [2023-12-20 12:46:08] Invalid progress position: "294928"
[debug] [2023-12-20 12:46:08] Burn online successfully!
[debug] [2023-12-20 12:46:08] Reboot the device ...
[error] [2023-12-20 12:46:08] aicupg_trans_recv_pkt()182: CBW size 0, Pipe error(-9)
[debug] [2023-12-20 12:46:08] Update "success_cnt" of "2023-12-20"
[debug] [2023-12-20 12:46:08] WinEvent: Some devnode changed
[debug] [2023-12-20 12:46:08] No device available
[debug] [2023-12-20 12:46:56] Current file path: "E:/ArtinChip/baremetal/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:47:08] Parse the image header from "E:/ArtinChip/luban-lite/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img"
[debug] [2023-12-20 12:47:08] Soc type: "d13x"
[debug] [2023-12-20 12:47:08] Board type: "demo88-nor"
[debug] [2023-12-20 12:47:08] Image version: "1.0.0"
[debug] [2023-12-20 12:47:08] Storage type: "spi-nor"
[debug] [2023-12-20 12:47:08] Storage ID: ""
[debug] [2023-12-20 12:47:08] Meta count: "4"
[debug] [2023-12-20 12:47:08] Refresh the partition tree ...
[debug] [2023-12-20 12:47:08] Part name: image.target.spl , size: 125968
[debug] [2023-12-20 12:47:08] Part name: image.target.os , size: 122320
[debug] [2023-12-20 12:47:12] WinEvent: Some devnode changed
[debug] [2023-12-20 12:47:12] There are "1" device available
[debug] [2023-12-20 12:47:12] Try to connect the ArtInChip device ...
[debug] [2023-12-20 12:47:12] WinEvent: Some devnode changed
[debug] [2023-12-20 12:47:12] Try to get Usb device hd info...
[debug] [2023-12-20 12:47:12] Boot device1: "0"
[debug] [2023-12-20 12:47:12] Boot device2: "0"
[debug] [2023-12-20 12:47:12] There are "1" device available
[debug] [2023-12-20 12:47:12] The status of ArtInChip device: true
[debug] [2023-12-20 12:47:22] Start burn online ...
[debug] [2023-12-20 12:47:22] Progress range: 0 ~ 376832
[debug] [2023-12-20 12:47:22] Burn Image file "E:/ArtinChip/luban-lite/output/d13x_demo88-nor_baremetal_helloworld/images/d13x_demo88-nor_v1.0.0.img" ...
[debug] [2023-12-20 12:47:22] Meta 0 image.updater.spl , size 125968 ...
[debug] [2023-12-20 12:47:22] Blocksize 4 , chunk 1048576 * 0 , rest 125968
[debug] [2023-12-20 12:47:22] Offset: 4096 Size: 125968
[debug] [2023-12-20 12:47:22] Dev "1:3" Send the rest data 125968
[error] [2023-12-20 12:47:22] aicupg_trans_recv_pkt()208: CSW size 0, Pipe error(-9)
[error] [2023-12-20 12:47:22] aicupg_cmd_send_fwc_data_final()704: Recv resp failed, expect 16, got 0
[debug] [2023-12-20 12:47:22] Don't check the result of image.updater.spl
[debug] [2023-12-20 12:47:22] Meta 1 image.info , size 2048 ...
[error] [2023-12-20 12:47:22] aicupg_trans_send_pkt()80: CBW tag 0x232, size 0, Input/Output Error(-1)
[error] [2023-12-20 12:47:22] aicupg_cmd_get_hwinfo()85: Send command failed. ret = 0, siz = 16
[debug] [2023-12-20 12:47:22] Wait to reconnect dev "1:3"
[debug] [2023-12-20 12:47:22] QTime("12:47:22.967") Wait for Dev "1:3" ready
[debug] [2023-12-20 12:47:22] WinEvent: Some devnode changed
[debug] [2023-12-20 12:47:23] WinEvent: Some devnode changed
[debug] [2023-12-20 12:47:23] WinEvent: Some devnode changed
[warn ] [2023-12-20 12:47:23] Set upg work mode: 0
[debug] [2023-12-20 12:47:23] Blocksize 1 , chunk 1048576 * 0 , rest 2048
[debug] [2023-12-20 12:47:23] Offset: 0 Size: 2048
[debug] [2023-12-20 12:47:23] Dev "1:3" Send the rest data 2048
[debug] [2023-12-20 12:47:23] Meta 2 image.target.spl , size 125968 ...
[debug] [2023-12-20 12:47:23] Blocksize 2048 , chunk 1048576 * 0 , rest 125968
[debug] [2023-12-20 12:47:23] Offset: 131072 Size: 125968
[debug] [2023-12-20 12:47:23] Dev "1:3" Send the rest data 126976
[debug] [2023-12-20 12:47:23] Meta 3 image.target.os , size 122320 ...
[debug] [2023-12-20 12:47:23] Blocksize 2048 , chunk 1048576 * 0 , rest 122320
[debug] [2023-12-20 12:47:23] Offset: 258048 Size: 122320
[debug] [2023-12-20 12:47:23] Dev "1:3" Send the rest data 122880
[warn ] [2023-12-20 12:47:23] Invalid progress position: "377872"
[debug] [2023-12-20 12:47:23] Burn online successfully!
[debug] [2023-12-20 12:47:23] Reboot the device ...
[error] [2023-12-20 12:47:23] aicupg_trans_send_pkt()104: CSW tag 0x268, size 0, Pipe error(-9)
[debug] [2023-12-20 12:47:23] Update "success_cnt" of "2023-12-20"
[debug] [2023-12-20 12:47:23] WinEvent: Some devnode changed
[debug] [2023-12-20 12:47:23] No device available
封装参考 88P的已经使用没有问题。100P的芯片还没有。
PackagePcbDoc.zip
验证F133上使用F1C200的 JPEG裸解码代码可以正常解码图片,
估计MJPEG视频也是可以的,代码参考 https://whycan.com/t_8114.html
FB init is ok.
show FB is ok.
FB[0] 0, 1 = 0xf800,f800.
VE Module 0x01C0E000 = 0xc0000007.
VE Version 0x01C0E0F0 = 0x16670040.
VE Version 0x01C0E11C = 0x0.
Resolution: 480x320
JPEG decoding: finish. 0mS
CISC GPIO init OK.
Cam ChipID : 0xffff
Cam ChipID : Error
F133-A 芯片读取VideoEngine寄存器,VE版本为0x16670040 和A33好像是一样的。
200S的VE寄存器好像也是一样的位置。是否可以用参考200的解码代码用在133上面呢,后面研究下。
FB init is ok.
show FB is ok.
FB[0] 0, 1 = 0xf800,f800.
VE Module 0x01C0E000 = 0xc0000007.
VE Version 0x01C0E0F0 = 0x16670040.
VE Version 0x01C0E11C = 0x0.
CISC GPIO init OK.
Cam ChipID : 0x5640
OV5640 init OK.
CISC Module init OK.
CISC Module init OK. C = 0x0. 70040.
VE 版本信息:
MACC_VE_VERSION
Offset: 0x00f0
Known values:
0x16230055 (A10/A20)
0x16250055 (A13)
0x16330040 (A31s)
0x16390028 (A80)
0x16670040 (A33)
0x16800040 (H3)
0x16890040 (A64)
大神,这个功能现在是否完善了,想向您学习一下,能否留一下联系方式。
使用图层yuv转RGB功能参数如下:
static const uint32_t csc_tab[4][12] =
{
//Y/G Y/G Y/G Y/G U/R U/R U/R U/R V/B V/B V/B V/B
//bt601
0x04a8, 0x1e70, 0x1cbf, 0x0878, 0x04a8, 0x0000, 0x0662, 0x3211, 0x04a8, 0x0812, 0x0000, 0x2eb1, //yuv2rgb
//bt709
0x04a8, 0x1f26, 0x1ddd, 0x04d0, 0x04a8, 0x0000, 0x072c, 0x307e, 0x04a8, 0x0876, 0x0000, 0x2dea, //yuv2rgb
//DISP_YCC
0x0400, 0x1e9e, 0x1d24, 0x087b, 0x0400, 0x0000, 0x059c, 0x34c8, 0x0400, 0x0716, 0x0000, 0x31d5, //yuv2rgb
//xvYCC
0x04a8, 0x1f26, 0x1ddd, 0x04d0, 0x04a8, 0x0000, 0x072c, 0x307e, 0x04a8, 0x0876, 0x0000, 0x2dea, //yuv2rgb
};
uint32_t Tn = 1;
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x950, (csc_tab[Tn][0])); //G
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x954, (csc_tab[Tn][1]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x958, (csc_tab[Tn][2]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x95C, (csc_tab[Tn][3]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x960, (csc_tab[Tn][4])); //R
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x964, (csc_tab[Tn][5]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x968, (csc_tab[Tn][6]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x96C, (csc_tab[Tn][7]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x970, (csc_tab[Tn][8])); //B
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x974, (csc_tab[Tn][9]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x978, (csc_tab[Tn][10]));
write32((virtual_addr_t)F1C100S_DEBE_BASE + 0x97C, (csc_tab[Tn][11]));
STM32使用CMake+MinGW+arm-none-eabi 编译通过
每个C都可以生成.obj文件,但是生成elf进行链接时候出现错误:unrecognized option '--major-image-version'
信息如下
PS D:\TEST\C2\build> make
[ 33%] Building C object CMakeFiles/S123.dir/111.c.obj
[ 66%] Building C object CMakeFiles/S123.dir/123.c.obj
[100%] Linking C executable S123.exe
f:/softtools/ide/gun/toolchain/10_2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'
f:/softtools/ide/gun/toolchain/10_2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
make[2]: *** [CMakeFiles\S123.dir\build.make:114: S123.exe] Error 1
make[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/S123.dir/all] Error 2
make: *** [Makefile:90: all] Error 2
然后就简单做了个2个c文件的测试。也是同样问题。麻烦大牛给点意见,谢谢。
CMake 文件如下:
cmake_minimum_required(VERSION 3.10)
project(S123)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR arm)
# debug build?
set(DEBUG "1")
# optimization
set(OPT "-Og")
ENABLE_LANGUAGE(ASM)
set(CROSS_COMPILER_PATH "F:/SoftTools/IDE/GUN/Toolchain/10_2020-q4-major")
set(CMAKE_C_COMPILER "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-gcc")
MESSAGE(STATUS,"compiler is ${CMAKE_C_COMPILER}")
set(CMAKE_ASM_COMPILER "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-gcc")
set(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-g++")
set(CMAKE_OBJCOPY "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-objcopy")
set(CMAKE_OBJDUMP "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-objdump" )
set(CMAKE_SIZE "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-size" )
set(CMAKE_NM "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-nm" )
set(CMAKE_DEBUGER "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-gdb")
set(CMAKE_CPPFILT "${CROSS_COMPILER_PATH}/bin/arm-none-eabi-c++filt" )
set(CMAKE_FIND_ROOT_PATH "${CROSS_COMPILER_PATH}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
aux_source_directory(. DIR_TOOT_SRCS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
add_executable(${PROJECT_NAME} ${DIR_TOOT_SRCS})
#add_executable(${PROJECT_NAME} 123.c)
sjshe3326 说:我使用的是N32905,926应该也是类似的。在固件包中有一个SDLoader的工程。编译这个SDLoader 就是SD启动的文件。
将编译好的SDLoader.bin文件用TurboWriter工具写在SD卡的sector0中。然后就可以用SD卡启动了,会加载用户代码执行。I have not 固件包中.
I saw only some documentation on nuvoton site, and i dont know where I can download flash packet.
你可以在 https://gitee.com/OpenNuvoton 中找到你需要的BSP。
如果不使用linux系统,可以编译 https://gitee.com/OpenNuvoton/N32926_NonOS_BSP/tree/master/Loader/SDLoader 的工程,
生成SDLoader.bin用于SD启动。
如果使用Linux 也有对应的工具可能是uboot。
看到这里有人做的移植 https://whycan.com/viewtopic.php?id=5913 也跟风一下。
调试新唐N3290x时候,顺便玩一下花1个小时移植了infoNES模拟器,跑起来还行。只移植了显示部分,控制和声音没去弄。
参考GitHub 上移植到STM32F4 芯片的代码。参考链接 https://github.com/Woody00h/InfoNES
屏幕240*320。NES输出256*240 不想旋转就直接裁掉了多的16列。NES输出RGB565,不是是逆序的BGR格式。要反一下不然颜色不对。
Hello. I have device with N32926U1DN cpu, which booting from SPI flash.
I want to boot from sd card. How can I make bootable SD?
Cant found any datasheets with boot description.Here is starting log, SD booting has first priority:
-------------------------------------------------------------------
Initial RTC .Enable Access Fail - Timeout
DRAM Init..2p
SD Port 0 Booting Fail - No/Unknown Device
NAND CS0 Booting Fail - No Boot Code Header
NAND CS1 Booting Fail - No Boot Code Header
SPI Booting
Write - 0xB0000204 = 0xFFFFFFFF
Write - 0xB0000208 = 0xFFFFFFFF
Write - 0xB0003008 = 0x0000805A
Write - 0xB0003028 = 0x2AFF3B4A
Write - 0xB0003004 = 0x00000021
Delay 256 us
....
-------------------------------------------------------------------
你需要在SD卡中写入启动IMG
可用的测试代码如下
//------------------------------------------------------//
// ADC input test
#if(0)
{
adc_init();
printf("adc test init OK. \n\r");
delay_s();
i = 0;
while(1)
{
delay_s();
u32_t v1 = adc_f1c100s_read(ADC_CHANNEL_FMINL);
delay_s();
u32_t v2 = adc_f1c100s_read(ADC_CHANNEL_FMINR);
delay_s();
u32_t v3 = adc_f1c100s_read(ADC_CHANNEL_LINL);
delay_s();
u32_t v4 = adc_f1c100s_read(ADC_CHANNEL_MIC);
printf("ADC: %08X, %08X, %08X, %08X \n\r", v1,v2,v3,v4);
}
}
#endif
u32_t adc_f1c100s_read(int channel)
{
u32_t mixerReg = read32(ADC_BAISADDR + ADC_MIXER_CTRL) & ~(0x1f << 8);
switch (channel)
{
case ADC_CHANNEL_FMINL:
write32(ADC_BAISADDR + ADC_MIXER_CTRL, mixerReg | (1 << 12));
break;
case ADC_CHANNEL_FMINR:
write32(ADC_BAISADDR + ADC_MIXER_CTRL, mixerReg | (1 << 11));
break;
case ADC_CHANNEL_LINL:
write32(ADC_BAISADDR + ADC_MIXER_CTRL, mixerReg | (1 << 10));
break;
case ADC_CHANNEL_MIC:
write32(ADC_BAISADDR + ADC_MIXER_CTRL, mixerReg | (1 << 13));
break;
default:
// mute all
break;
}
udelay(); // wait for internal filter to be stable
// FIFO flush
write32(ADC_BAISADDR + ADC_FIFOC, read32(ADC_BAISADDR + ADC_FIFOC) | (1 << 0));
while( (read32(ADC_BAISADDR + ADC_FIFOS) & (1 <<23))==0);
// by default, 0V = -24000 and VRA = 0.
// make 0V = 0 and vreference = 65535.
int val = (read32(ADC_BAISADDR + ADC_RXDATA));// >> 16);
return (u32_t)val;
}
void adc_init(void)
{
// ADC打开时钟 //
write32( 0x01C20008, (read32(0x01C20008) | (1<<31)) );
write32( 0x01C20068, (read32(0x01C20068) | (1<<0)) );
write32( 0x01C20140, (read32(0x01C20140) | (1<<31)) );
udelay();
write32( 0x01C202D0, (read32(0x01C202D0) | (1<<0)) );
udelay();
//24kHz采样率 ,// digital enable // fifo mode 0 delay 0 8fifo 16bit mono
u32_t regVal = (2 << 29) | (1 <<28) | (0xf << 8) | (1 << 7);
write32(ADC_BAISADDR + ADC_FIFOC, regVal);
// ADC enable gain 0 all mute
regVal = (1 << 31) | (3<<24) | (3<<16)| (1 <<14) | (1<<7) | (1<<3) | (0 << 0);
write32(ADC_BAISADDR + ADC_MIXER_CTRL, regVal);
}
使用N32903 Non-OS 代码,启动时候遇到问题,麻烦大家帮忙指导下。谢谢。
系统启动信息如下:
Init RTC....OK
DDR size: 32MB
SD Port0 Booting Fail - No/Bad Card Insert
NAND Booting (2K-page 4 Address Cycle) Success
Clock Skew
DQSODS 0x1010
CKDQSDS 0x888800
Code Executes at 0x00700000
然后就卡住了。
如果使用直接在SDRAM中运行单独的bin是可以的。
Execute File 0x0
start gpio test...123
调了几天DCI,终于搞好了,坑真多。
OV2640设置为SVGA,RBG565输出480*272大小。使用DE直接显示在LCD上。
目前还有几个问题待解决:1:PE11输出CLK_OUT 还没搞定,目前使用PE12 PWM0输出24M,飞线给PE11.
2: 显示上有点蓝色条纹,很规律,不确定是否是摄像头没有配置好。
3:OV的数码变焦和一些参数设定 待研究
TBD:摄像头图层和其他显示图层叠加等后面在研究。
使用硬件为tiny200 R3。摄像头OV2640,LCD480*272,附件bin文件大家可以试试。别忘了PE12,PE11要接在一起,或者给PE11一个24M时钟。
BIN文件:f1c100s_Tiny200r3_CamTest.zip
视频如下:
设置CSI寄存器时候发现 CSI_SCALE(0x0C) 异常,规格书默认值是0x0F00FFFF。
读取时候发现始终是0x0, 计算手动设置了write32(CSI_BAISADDR + CSI_SCALE, 0x0F00FFFF); 读取还是0.
不知各位有遇到没。
串口输出寄存器信息如下:
Boot to SPI mode
CSI: SCCB ID = 0x26,42.
CSI: OV2640 reg init OK
CSI: Module init OK.
CSI: reg dunp: 0x00 = 0x00000001.....
CSI: reg dunp: 0x04 = 0x00000207.....
CSI: reg dunp: 0x08 = 0x00000000.....
CSI: reg dunp: 0x0c = 0x00000000.....
CSI: reg dunp: 0x10 = 0x80365D30.....
CSI: reg dunp: 0x14 = 0x80366D30.....
CSI: reg dunp: 0x18 = 0x80367D30.....
CSI: reg dunp: 0x1c = 0x80368D30.....
CSI: reg dunp: 0x20 = 0x80369D30.....
CSI: reg dunp: 0x24 = 0x8036AD30.....
CSI: reg dunp: 0x28 = 0x00000001.....
CSI: reg dunp: 0x2c = 0x00000000.....
CSI: reg dunp: 0x30 = 0x000000DF.....
CSI: reg dunp: 0x34 = 0x00000000.....
CSI: reg dunp: 0x38 = 0x00000000.....
CSI: reg dunp: 0x3c = 0x00000000.....
CSI: reg dunp: 0x40 = 0x05E000FE.....
CSI: reg dunp: 0x44 = 0x01E00064.....
CSI: reg dunp: 0x48 = 0x00000400.....
sjshe3326 说:裸跑F1C100S 使用SPI1时候发现,设置spi1寄存器,再读取发现一直时0,没有设置进去。有朋友遇到过没。
SPI1时钟已经开启:
// SPI1 打开时钟 //
write32( 0x01C20060, (read32(0x01C20060) | (1<<21)) );SPI1寄存器基地址也没错0x01c06000,读取SPI0的寄存器就可以返回数据。
使能时钟后一般要使能时钟复位。200s手册上可以查到 spi1_rst是偏移0x02c0地址寄存器的第21位。
所以你可以在后面加上一句write32( 0x01C20000+0x2c0, (read32(0x01C20000+0x2c0) | (1<<21)) );
然后在延时个1ms。然后再操作寄存器看。
非常感谢,的确加上bus rst就正常了。
硬件是 tiny200 r3。
软件是达克罗德大神的裸跑代码:
F1C100S裸奔framebuffer+PWM+GPIO驱动
http://whycan.com/t_1457.html
(出处:哇酷开发者社区【全志 V3S/F1C100s/X3】)
demo视频如下:
双图层叠加平移测试视频
使用论坛里裸跑 Framebuffer,原始代码只使用了Display Engine种back-end模块的Layer0图层.使用外部2个vbuf作为缓存。
DEbe可以支持4个图层的alpha和叠加等操作。这里测试了下,使用2个图层Layer0 和 Layer1。关闭alpha,只用了叠加(color key)。
效果参考视频。
修改部分主要是 f1c100s_debe_set_mode 函数设置Debe的模式,就可以了。
inline static void f1c100s_debe_set_mode(fb_f1c100s_pdata_t * pdat)
{
struct f1c100s_debe_reg_t * debe = (struct f1c100s_debe_reg_t *)(pdat->virtdebe);
uint32_t val;
// F1C200s DEbe模块使用双图层 //
// 是能 DEbe模块 //
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 0);
write32((virtual_addr_t)&debe->mode, val);
// 显示尺寸 //
write32((virtual_addr_t)&debe->disp_size, (((pdat->height) - 1) << 16) | (((pdat->width) - 1) << 0));
// 背景颜色 //
write32((virtual_addr_t)&debe->backcolor, (0x00503050) );
// 颜色KEY //
write32((virtual_addr_t)&debe->color_key_max, (0x00FFFFFF) );
write32((virtual_addr_t)&debe->color_key_min, (0x00303030) );
write32((virtual_addr_t)&debe->color_key_config, (0x0000003F) );
// Layer0 设置 //
write32((virtual_addr_t)&debe->layer0_size, (((pdat->height) - 1) << 16) | (((pdat->width) - 1) << 0)); // Layer0 尺寸 pos默认0//
write32((virtual_addr_t)&debe->layer0_stride, ((pdat->width) << 5)); // Layer0 帧缓存行尺寸 480*32//
write32((virtual_addr_t)&debe->layer0_addr_low32b, (uint32_t)(pdat->vram[0]) << 3); // Layer0 帧缓存地址 //
write32((virtual_addr_t)&debe->layer0_addr_high4b, (uint32_t)(pdat->vram[0]) >> 29);
write32((virtual_addr_t)&debe->layer0_attr1_ctrl, 0x09 << 8); // Layer0 32BPP//
write32((virtual_addr_t)&debe->layer0_attr0_ctrl, (0x80 << 24) | (0 << 18) | (1 << 15) | (3 << 10) | (0) );// Layer0 Pipe1 优先级3/
// Layer1 设置 //
write32((virtual_addr_t)&debe->layer1_size, (((pdat->height) - 1) << 16) | (((pdat->width) - 1) << 0)); // Layer1 尺寸 pos默认0//
write32((virtual_addr_t)&debe->layer1_stride, ((pdat->width) << 5)); // Layer1 帧缓存行尺寸 480*32//
write32((virtual_addr_t)&debe->layer1_addr_low32b, (uint32_t)(pdat->vram[1]) << 3); // Layer1 帧缓存地址 //
write32((virtual_addr_t)&debe->layer1_addr_high4b, (uint32_t)(pdat->vram[1]) >> 29);
write32((virtual_addr_t)&debe->layer1_attr1_ctrl, 0x09 << 8); // Layer1 32BPP//
write32((virtual_addr_t)&debe->layer1_attr0_ctrl, (0xF0 << 24) | (1 << 18) | (0 << 15) | (2 << 10) | (0) );// Layer1 Pipe0 优先级2/
// Layer 0/1 使能 //
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 8); // Layer 0
val |= (1 << 9); // Layer 1
write32((virtual_addr_t)&debe->mode, val);
// Auto load mode //
val = read32((virtual_addr_t)&debe->reg_ctrl);
val |= (1 << 0);
write32((virtual_addr_t)&debe->reg_ctrl, val);
// start DEbe //
val = read32((virtual_addr_t)&debe->mode);
val |= (1 << 1);
write32((virtual_addr_t)&debe->mode, val);
}
页次: 1