赤菟307板子,杜邦線接ov2640顯示到LCD屏幕上花屏,RB_DVP_IF_FRM_DONE中斷檢測不到

剛剛調(diào)通了LCD屏幕,

?LCD ID:9341 width:240 height:320?

想在屏幕上顯示ov2640攝像頭的數(shù)據(jù),調(diào)試了一天多,線插了N次。估計是杜邦線的問題,導(dǎo)致檢測不到。這個攝像頭我已經(jīng)在STM32F411上采集通過,也在STM32F407上采集通過了,都是杜邦線連接的。個人覺得用CH32V307的DVP應(yīng)該也沒啥問題,就過來一試,結(jié)果如圖所示:

1654578410182882.jpg

1654578410558918.jpg

串口打印輸出:

[13:27:34.607]收←◆SystemClk:72000000


[13:27:34.658]收←◆ LCD ID:9341


[13:27:34.790]收←◆width:240 height:320?


[13:27:35.453]收←◆Camera Suc


[13:27:37.530]收←◆RGB565_MODE


[13:27:37.619]收←◆DVP START FRAM,the frame_cnt is 0


[13:27:37.753]收←◆DVP FRAM DONE,the href_cnt is 160

DVP STOP FRAM


[13:27:37.885]收←◆DVP START FRAM,the frame_cnt is 1


[13:27:38.018]收←◆DVP STOP FRAM


[13:27:38.153]收←◆DVP START FRAM,the frame_cnt is 2


[13:27:38.285]收←◆DVP STOP FRAM


[13:27:38.419]收←◆DVP START FRAM,the frame_cnt is 3


[13:27:38.552]收←◆DVP STOP FRAM


[13:27:38.686]收←◆DVP START FRAM,the frame_cnt is 4


[13:27:38.818]收←◆DVP STOP FRAM


[13:27:38.952]收←◆DVP START FRAM,the frame_cnt is 5


[13:27:39.085]收←◆DVP STOP FRAM


[13:27:39.218]收←◆DVP START FRAM,the frame_cnt is 6


[13:27:39.353]收←◆DVP STOP FRAM


[13:27:39.485]收←◆DVP START FRAM,the frame_cnt is 7


[13:27:39.618]收←◆DVP STOP FRAM


[13:27:39.752]收←◆DVP START FRAM,the frame_cnt is 8


[13:27:39.884]收←◆DVP STOP FRAM


[13:27:40.019]收←◆DVP START FRAM,the frame_cnt is 9


[13:27:40.151]收←◆DVP STOP FRAM


[13:27:40.285]收←◆DVP START FRAM,the frame_cnt is 10


[13:27:40.418]收←◆DVP STOP FRAM


[13:27:40.551]收←◆DVP START FRAM,the frame_cnt is 11


[13:27:40.683]收←◆DVP STOP FRAM


[13:27:40.818]收←◆DVP START FRAM,the frame_cnt is 12


[13:27:40.952]收←◆DVP FRAM DONE,the href_cnt is 480

DVP STOP FRAM


[13:27:41.085]收←◆DVP START FRAM,the frame_cnt is 13


[13:27:41.217]收←◆DVP STOP FRAM


[13:27:41.351]收←◆DVP START FRAM,the frame_cnt is 14


[13:27:41.484]收←◆DVP STOP FRAM


[13:27:41.617]收←◆DVP START FRAM,the frame_cnt is 15


[13:27:41.750]收←◆DVP STOP FRAM


[13:27:41.884]收←◆DVP START FRAM,the frame_cnt is 16


[13:27:42.018]收←◆DVP FRAM DONE,the href_cnt is 16

[13:27:42.053]收←◆0

DVP STOP FRAM


[13:27:42.151]收←◆DVP START FRAM,the frame_cnt is 17


[13:27:42.283]收←◆DVP STOP FRAM


[13:27:42.417]收←◆DVP START FRAM,the frame_cnt is?

[13:27:42.447]收←◆18


[13:27:42.549]收←◆DVP STOP FRAM


[13:27:42.684]收←◆DVP START FRAM,the frame_cnt is 19


[13:27:42.816]收←◆DVP STOP FRAM


[13:27:42.950]收←◆DVP START FRAM,the frame_cnt is 20


[13:27:43.082]收←◆DVP STOP FRAM


[13:27:43.216]收←◆DVP START FRAM,the frame_cnt is 21


[13:27:43.349]收←◆DVP STOP FRAM


[13:27:43.482]收←◆DVP START FRAM,the frame_cnt is 22


[13:27:43.615]收←◆DVP STOP FRAM


[13:27:43.750]收←◆DVP START FRAM,the frame_cnt is 23


[13:27:43.882]收←◆DVP STOP FRAM


[13:27:44.016]收←◆DVP START FRAM,the frame_cnt is 24


[13:27:44.149]收←◆DVP STOP FRAM


[13:27:44.282]收←◆DVP START FRAM,the frame_cnt is 25


[13:27:44.415]收←◆DVP STOP FRAM


[13:27:44.549]收←◆DVP START FRAM,the frame_cnt is 26


[13:27:44.682]收←◆DVP STOP FRAM


[13:27:44.818]收←◆DVP START FRAM,the frame_cnt is 27


[13:27:44.948]收←◆DVP STOP FRAM


[13:27:45.082]收←◆DVP START FRAM,the frame_cnt is 28


[13:27:45.216]收←◆DVP FRAM DONE,the href_cnt is 480

DVP STOP FRAM


[13:27:45.348]收←◆DVP START FRAM,the frame_cnt is 29


[13:27:45.482]收←◆DVP STOP FRAM


[13:27:45.615]收←◆DVP START FRAM,the frame_cnt is 30


[13:27:45.748]收←◆DVP STOP FRAM


[13:27:45.881]收←◆DVP START FRAM,the frame_cnt is 31


[13:27:46.014]收←◆DVP STOP FRAM


[13:27:46.148]收←◆DVP START FRAM,the frame_cnt is 32


[13:27:46.282]收←◆DVP FRAM DONE,the href_cnt is 160

DVP STOP FRAM


[13:27:46.414]收←◆DVP START FRAM,the frame_cnt is 33


[13:27:46.547]收←◆DVP STOP FRAM


[13:27:46.681]收←◆DVP START FRAM,the frame_cnt is 34


[13:27:46.814]收←◆DVP STOP FRAM


[13:27:46.948]收←◆DVP START FRAM,the frame_cnt is 35


[13:27:47.081]收←◆DVP STOP FRAM


[13:27:47.215]收←◆DVP START FRAM,the frame_cnt is 36


[13:27:47.348]收←◆DVP FRAM DONE,the href_cnt is 160

DVP STOP FRAM


[13:27:47.480]收←◆DVP START FRAM,the frame_cnt is 37


[13:27:47.613]收←◆DVP STOP FRAM


[13:27:47.748]收←◆DVP START FRAM,the frame_cnt is 38


[13:27:47.880]收←◆DVP STOP FRAM


[13:27:48.014]收←◆DVP START FRAM,the frame_cnt is 39


[13:27:48.147]收←◆DVP STOP FRAM


[13:27:48.281]收←◆DVP START FRAM,the frame_cnt is 40


[13:27:48.414]收←◆DVP FRAM DONE,the href_cnt is 16

[13:27:48.437]收←◆0

DVP STOP FRAM


[13:27:48.547]收←◆DVP START FRAM,the frame_cnt is 41


[13:27:48.683]收←◆DVP STOP FRAM


[13:27:48.813]收←◆DVP START FRAM,the frame_cnt is 42


[13:27:48.946]收←◆DVP STOP FRAM


[13:27:49.080]收←◆DVP START FRAM,the frame_cnt is 43


[13:27:49.212]收←◆DVP STOP FRAM


[13:27:49.346]收←◆DVP START FRAM,the frame_cnt is 44


[13:27:49.479]收←◆DVP STOP FRAM


[13:27:49.613]收←◆DVP START FRAM,the frame_cnt is 45

[13:27:49.642]收←◆


[13:27:49.746]收←◆DVP STOP FRAM


[13:27:49.879]收←◆DVP START FRAM,the frame_cnt is?

[13:27:49.907]收←◆46


[13:27:50.013]收←◆DVP STOP FRAM


[13:27:50.146]收←◆DVP START FRAM,the frame_cnt is 47


[13:27:50.279]收←◆DVP STOP FRAM


[13:27:50.413]收←◆DVP START FRAM,the frame_cnt is 48


[13:27:50.545]收←◆DVP STOP FRAM


[13:27:50.679]收←◆DVP START FRAM,the frame_cnt is 49


[13:27:50.812]收←◆DVP STOP FRAM


[13:27:50.945]收←◆DVP START FRAM,the frame_cnt is 50


[13:27:51.078]收←◆DVP STOP FRAM


[13:27:51.211]收←◆DVP START FRAM,the frame_cnt is 51


[13:27:51.344]收←◆DVP STOP FRAM


[13:27:51.478]收←◆DVP START FRAM,the frame_cnt is 52


[13:27:51.611]收←◆DVP STOP FRAM


[13:27:51.746]收←◆DVP START FRAM,the frame_cnt is 53


[13:27:51.878]收←◆DVP STOP FRAM


[13:27:52.014]收←◆DVP START FRAM,the frame_cnt is 54


[13:27:52.144]收←◆DVP STOP FRAM


[13:27:52.278]收←◆DVP START FRAM,the frame_cnt is 55


[13:27:52.411]收←◆DVP STOP FRAM


[13:27:52.545]收←◆DVP START FRAM,the frame_cnt is 56


[13:27:52.677]收←◆DVP STOP FRAM


[13:27:52.811]收←◆DVP START FRAM,the frame_cnt is 57


[13:27:52.944]收←◆DVP STOP FRAM


[13:27:53.079]收←◆DVP START FRAM,the frame_cnt is 58


[13:27:53.210]收←◆DVP STOP FRAM


[13:27:53.344]收←◆DVP START FRAM,the frame_cnt is 59


[13:27:53.476]收←◆DVP STOP FRAM


[13:27:53.611]收←◆DVP START FRAM,the frame_cnt is 60


[13:27:53.743]收←◆DVP STOP FRAM


[13:27:53.877]收←◆DVP START FRAM,the frame_cnt is 61


[13:27:54.013]收←◆DVP STOP FRAM


[13:27:54.143]收←◆DVP START FRAM,the frame_cnt is 62


[13:27:54.277]收←◆DVP STOP FRAM


[13:27:54.411]收←◆DVP START FRAM,the frame_cnt is 63


[13:27:54.542]收←◆DVP STOP FRAM


[13:27:54.676]收←◆DVP START FRAM,the frame_cnt is 64


[13:27:54.810]收←◆DVP STOP FRAM


[13:27:54.943]收←◆DVP START FRAM,the frame_cnt is 65


[13:27:55.076]收←◆DVP STOP FRAM


[13:27:55.210]收←◆DVP START FRAM,the frame_cnt is 66


[13:27:55.343]收←◆DVP STOP FRAM


[13:27:55.476]收←◆DVP START FRAM,the frame_cnt is 67


[13:27:55.610]收←◆DVP STOP FRAM


[13:27:55.743]收←◆DVP START FRAM,the frame_cnt is 68


[13:27:55.877]收←◆DVP STOP FRAM


[13:27:56.011]收←◆DVP START FRAM,the frame_cnt is 69


[13:27:56.142]收←◆DVP STOP FRAM


[13:27:56.276]收←◆DVP START FRAM,the frame_cnt is?

[13:27:56.307]收←◆70


[13:27:56.409]收←◆DVP STOP FRAM


[13:27:56.542]收←◆DVP START FRAM,the frame_cnt is 71


[13:27:56.675]收←◆DVP STOP FRAM

打印代碼如下:

void DVP_IRQHandler(void)

{


? ? if (DVP->IFR & RB_DVP_IF_ROW_DONE)

? ? {

//? ? ? ? printf("DVP ROW DONE\r\n");

? ? ? ? /* Write 0 clear 0 */

? ? ? ? DVP->IFR &= ~RB_DVP_IF_ROW_DONE;? //clear Interrupt


#if (DVP_Work_Mode == RGB565_MODE)

? ? ? ? if (addr_cnt%2)? ? ?//buf1 done

? ? ? ? {

? ? ? ? ? ? addr_cnt++;

? ? ? ? ? ? //Send DVP data to LCD

? ? ? ? ? ? DMA_Cmd(DMA2_Channel5, DISABLE );

? ? ? ? ? ? DMA_SetCurrDataCounter(DMA2_Channel5,lcddev.width);

? ? ? ? ? ? DMA2_Channel5->PADDR = RGB565_DVPDMAaddr0;

? ? ? ? ? ? DMA_Cmd(DMA2_Channel5, ENABLE);


? ? ? ? }

? ? ? ? else? ? ? ? ? ? ? ? //buf0 done

? ? ? ? {

? ? ? ? ? ? addr_cnt++;

? ? ? ? ? ? //Send DVP data to LCD

? ? ? ? ? ? DMA_Cmd(DMA2_Channel5, DISABLE );

? ? ? ? ? ? DMA_SetCurrDataCounter(DMA2_Channel5,lcddev.width);

? ? ? ? ? ? DMA2_Channel5->PADDR = RGB565_DVPDMAaddr1;

? ? ? ? ? ? DMA_Cmd(DMA2_Channel5, ENABLE);

? ? ? ? }


? ? ? ? href_cnt++;



#endif


? ? }


? ? if (DVP->IFR & RB_DVP_IF_FRM_DONE)

? ? {

? ? ? ? DVP->IFR &= ~RB_DVP_IF_FRM_DONE;? //clear Interrupt


#if (DVP_Work_Mode == RGB565_MODE)

? ? ? ? printf("DVP FRAM DONE,the href_cnt is %d\r\n",href_cnt);

? ? ? ? addr_cnt = 0;

? ? ? ? href_cnt = 0;


#endif


? ? }


? ? if (DVP->IFR & RB_DVP_IF_STR_FRM)

? ? {

? ? ? ? DVP->IFR &= ~RB_DVP_IF_STR_FRM;

? ? ? ? printf("DVP START FRAM,the frame_cnt is %d\r\n",frame_cnt);

? ? ? ? frame_cnt++;

? ? }


? ? if (DVP->IFR & RB_DVP_IF_STP_FRM)

? ? {

? ? ? ? printf("DVP STOP FRAM\r\n");

? ? ? ? DVP->IFR &= ~RB_DVP_IF_STP_FRM;


? ? }


? ? if (DVP->IFR & RB_DVP_IF_FIFO_OV)

? ? {

? ? ? ? printf("DVP FIFO OV\r\n");

? ? ? ? DVP->IFR &= ~RB_DVP_IF_FIFO_OV;

#if 0

? ? ? ? printf("FIFO OV\r\n");


#endif

? ? }


}

按理說:href_cnt為320產(chǎn)生一個RB_DVP_IF_FRM_DONE,然后清零。每一行為240像素,每個像素2字節(jié),也就是480。按奇偶存儲到不同的地址空間進行顯示去。


問題:1、這種杜邦線是否能夠?qū)崿F(xiàn)出圖?還是需要字節(jié)做板子用FPC連接出圖。

? ? ? ? ? 2、中斷未檢測到是否多半與杜邦線連接有關(guān)?

? ? ? ? ? 3、能給出一些指導(dǎo)意見,從現(xiàn)有硬件上調(diào)出圖像。


熱門產(chǎn)品 : USB3.0 HUB控制器:CH634

您好,使用杜邦線應(yīng)該也是沒問題的,注意使用的杜邦線不要太長。在我們CH32V307EVT例程下DVP文件夾內(nèi)有DVP操作OV2640的例程,可以參考一下。附件為CH32V307與OV2640連接的原理圖,可以參考一下。

CH32V307EVT下載鏈接:http://www.findthetime.net/downloads/CH32V307EVT_ZIP.html?

icon_pdf.gifHD_V307_TA-1v0.pdf

image.png


image.png


href_cnt是什么意思啊?


您好,href_cnt是程序中定義的一個32位的變量,該變量主要用于在JPEG模式下,記錄進入行結(jié)束中斷的次數(shù),具體可結(jié)合程序代碼來看


這個板子的DSDA和DSCL直接接到OV2640不用加上拉電阻嗎



您好,要接的,在CH32V307 EVT PUB文件夾下有我們帶DVP接口的開發(fā)板的原理圖,你可以參考最新EVT的原理圖,如下。EVT下載鏈接如下:

http://www.findthetime.net/downloads/CH32V307EVT_ZIP.html?

image.png


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频