大家好!我用STM32作摄像头驱动,直接将摄像头数据现在到FSMC接口的LCD上,已经可以工作了,但3百万像素一帧需要2~3秒,想提高速率,问一下除了我下面的方法外,还有没有更快的方法检测输入管脚电平变化? 1009: { 1010: uint32_t i,j; 1011: 1012: union 1013: { 1014: uint8_t ucBuf[2]; 1015: uint16_t usData 1016: }U8_U16; 1017: 0x08007C9C B538 PUSH {r3-r5,lr} 1018: __set_PRIMASK(1); 0x08007C9E 2001 MOVS r0,#0x01 0x08007CA0 F7F8FA67 BL.W __set_PRIMASK (0x08000172) 1019: LCD_SetCursor(lcdLINE_START, lcdCOLUMN_START); 0x08007CA4 2100 MOVS r1,#0x00 0x08007CA6 4608 MOV r0,r1 0x08007CA8 F7FCF93A BL.W LCD_SetCursor (0x08003F20) 1020: LCD->LCD_REG = R34;//LCD_WriteRAM_Prepare 0x08007CAC 2022 MOVS r0,#0x22 0x08007CAE F04F41D8 MOV r1,#0x6C000000 0x08007CB2 8008 STRH r0,[r1,#0x00] 1021: while(!((*((volatile unsigned long*)(VSYNC_PORT+GPIOx_IDR)))&VSYNC_PIN)); // 等待VSYNC的上升沿 0x08007CB4 BF00 NOP 0x08007CB6 485D LDR r0,[pc,#372] ; @0x08007E2C 0x08007CB8 6800 LDR r0,[r0,#0x00] 0x08007CBA F4106F00 TST r0,#0x800 0x08007CBE D0FA BEQ 0x08007CB6 1022: while((*((volatile unsigned long*)(VSYNC_PORT+GPIOx_IDR)))&VSYNC_PIN); // 等待VSYNC的下降沿 0x08007CC0 BF00 NOP 0x08007CC2 485A LDR r0,[pc,#360] ; @0x08007E2C 0x08007CC4 6800 LDR r0,[r0,#0x00] 0x08007CC6 F4106F00 TST r0,#0x800 0x08007CCA D1FA BNE 0x08007CC2 1023: for(j=0;j<240;j++) 1024: //for(j=0;j<1536;j++) 1025: { 0x08007CCC 2500 MOVS r5,#0x00 0x08007CCE E0A5 B 0x08007E1C 1026: while(!((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN)); // 等待HREF的上升沿 0x08007CD0 BF00 NOP 0x08007CD2 4856 LDR r0,[pc,#344] ; @0x08007E2C 0x08007CD4 6800 LDR r0,[r0,#0x00] 0x08007CD6 F4105F00 TST r0,#0x2000 0x08007CDA D0FA BEQ 0x08007CD2 1027: while((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN); // 等待HREF的下降沿 1028: 0x08007CDC BF00 NOP 0x08007CDE 4853 LDR r0,[pc,#332] ; @0x08007E2C 0x08007CE0 6800 LDR r0,[r0,#0x00] 0x08007CE2 F4105F00 TST r0,#0x2000 0x08007CE6 D1FA BNE 0x08007CDE 1029: while(!((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN)); // 等待HREF的上升沿 0x08007CE8 BF00 NOP 0x08007CEA 4850 LDR r0,[pc,#320] ; @0x08007E2C 0x08007CEC 6800 LDR r0,[r0,#0x00] 0x08007CEE F4105F00 TST r0,#0x2000 0x08007CF2 D0FA BEQ 0x08007CEA 1030: while((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN); // 等待HREF的下降沿 1031: 0x08007CF4 BF00 NOP 0x08007CF6 484D LDR r0,[pc,#308] ; @0x08007E2C 0x08007CF8 6800 LDR r0,[r0,#0x00] 0x08007CFA F4105F00 TST r0,#0x2000 0x08007CFE D1FA BNE 0x08007CF6 1032: while(!((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN)); // 等待HREF的上升沿 0x08007D00 BF00 NOP 0x08007D02 484A LDR r0,[pc,#296] ; @0x08007E2C 0x08007D04 6800 LDR r0,[r0,#0x00] 0x08007D06 F4105F00 TST r0,#0x2000 0x08007D0A D0FA BEQ 0x08007D02 1033: while((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN); // 等待HREF的下降沿 1034: 0x08007D0C BF00 NOP 0x08007D0E 4847 LDR r0,[pc,#284] ; @0x08007E2C 0x08007D10 6800 LDR r0,[r0,#0x00] 0x08007D12 F4105F00 TST r0,#0x2000 0x08007D16 D1FA BNE 0x08007D0E 1035: while(!((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN)); // 等待HREF的上升沿 0x08007D18 BF00 NOP 0x08007D1A 4844 LDR r0,[pc,#272] ; @0x08007E2C 0x08007D1C 6800 LDR r0,[r0,#0x00] 0x08007D1E F4105F00 TST r0,#0x2000 0x08007D22 D0FA BEQ 0x08007D1A 1036: for(i=0;i<320;i++) 1037: //for(i=0;i<2048;i++) 1038: { 1039: /* 1040: if(!((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN))//HREF为低电平, 无效则退出 1041: { 1042: return; 1043: } 1044: */ 1045: 0x08007D24 2400 MOVS r4,#0x00 0x08007D26 E06F B 0x08007E08 1046: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007D28 BF00 NOP 0x08007D2A 4840 LDR r0,[pc,#256] ; @0x08007E2C 0x08007D2C 6800 LDR r0,[r0,#0x00] 0x08007D2E F0100F01 TST r0,#0x01 0x08007D32 D0FA BEQ 0x08007D2A 1047: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 0x08007D34 BF00 NOP 0x08007D36 483D LDR r0,[pc,#244] ; @0x08007E2C 0x08007D38 6800 LDR r0,[r0,#0x00] 0x08007D3A F0100F01 TST r0,#0x01 0x08007D3E D1FA BNE 0x08007D36 1048: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007D40 BF00 NOP 0x08007D42 483A LDR r0,[pc,#232] ; @0x08007E2C 0x08007D44 6800 LDR r0,[r0,#0x00] 0x08007D46 F0100F01 TST r0,#0x01 0x08007D4A D0FA BEQ 0x08007D42 1049: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 1050: 0x08007D4C BF00 NOP 0x08007D4E 4837 LDR r0,[pc,#220] ; @0x08007E2C 0x08007D50 6800 LDR r0,[r0,#0x00] 0x08007D52 F0100F01 TST r0,#0x01 0x08007D56 D1FA BNE 0x08007D4E 1051: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007D58 BF00 NOP 0x08007D5A 4834 LDR r0,[pc,#208] ; @0x08007E2C 0x08007D5C 6800 LDR r0,[r0,#0x00] 0x08007D5E F0100F01 TST r0,#0x01 0x08007D62 D0FA BEQ 0x08007D5A 1052: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 0x08007D64 BF00 NOP 0x08007D66 4831 LDR r0,[pc,#196] ; @0x08007E2C 0x08007D68 6800 LDR r0,[r0,#0x00] 0x08007D6A F0100F01 TST r0,#0x01 0x08007D6E D1FA BNE 0x08007D66 1053: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007D70 BF00 NOP 0x08007D72 482E LDR r0,[pc,#184] ; @0x08007E2C 0x08007D74 6800 LDR r0,[r0,#0x00] 0x08007D76 F0100F01 TST r0,#0x01 0x08007D7A D0FA BEQ 0x08007D72 1054: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 1055: 0x08007D7C BF00 NOP 0x08007D7E 482B LDR r0,[pc,#172] ; @0x08007E2C 0x08007D80 6800 LDR r0,[r0,#0x00] 0x08007D82 F0100F01 TST r0,#0x01 0x08007D86 D1FA BNE 0x08007D7E 1056: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007D88 BF00 NOP 0x08007D8A 4828 LDR r0,[pc,#160] ; @0x08007E2C 0x08007D8C 6800 LDR r0,[r0,#0x00] 0x08007D8E F0100F01 TST r0,#0x01 0x08007D92 D0FA BEQ 0x08007D8A 1057: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 0x08007D94 BF00 NOP 0x08007D96 4825 LDR r0,[pc,#148] ; @0x08007E2C 0x08007D98 6800 LDR r0,[r0,#0x00] 0x08007D9A F0100F01 TST r0,#0x01 0x08007D9E D1FA BNE 0x08007D96 1058: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007DA0 BF00 NOP 0x08007DA2 4822 LDR r0,[pc,#136] ; @0x08007E2C 0x08007DA4 6800 LDR r0,[r0,#0x00] 0x08007DA6 F0100F01 TST r0,#0x01 0x08007DAA D0FA BEQ 0x08007DA2 1059: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 1060: 0x08007DAC BF00 NOP 0x08007DAE 481F LDR r0,[pc,#124] ; @0x08007E2C 0x08007DB0 6800 LDR r0,[r0,#0x00] 0x08007DB2 F0100F01 TST r0,#0x01 0x08007DB6 D1FA BNE 0x08007DAE 1061: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007DB8 BF00 NOP 0x08007DBA 481C LDR r0,[pc,#112] ; @0x08007E2C 0x08007DBC 6800 LDR r0,[r0,#0x00] 0x08007DBE F0100F01 TST r0,#0x01 0x08007DC2 D0FA BEQ 0x08007DBA 1062: U8_U16.ucBuf[1]=(*((volatile unsigned long*)(DATA_PORT+GPIOx_IDR))); 0x08007DC4 481A LDR r0,[pc,#104] ; @0x08007E30 0x08007DC6 6880 LDR r0,[r0,#0x08] 0x08007DC8 B2C0 UXTB r0,r0 0x08007DCA F88D0001 STRB r0,[sp,#0x01] 1063: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 0x08007DCE BF00 NOP 0x08007DD0 4816 LDR r0,[pc,#88] ; @0x08007E2C 0x08007DD2 6800 LDR r0,[r0,#0x00] 0x08007DD4 F0100F01 TST r0,#0x01 0x08007DD8 D1FA BNE 0x08007DD0 1064: while(!((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN)); // 等待PCLK的上升沿 0x08007DDA BF00 NOP 0x08007DDC 4813 LDR r0,[pc,#76] ; @0x08007E2C 0x08007DDE 6800 LDR r0,[r0,#0x00] 0x08007DE0 F0100F01 TST r0,#0x01 0x08007DE4 D0FA BEQ 0x08007DDC 1065: U8_U16.ucBuf[0]=(*((volatile unsigned long*)(DATA_PORT+GPIOx_IDR))); 0x08007DE6 4812 LDR r0,[pc,#72] ; @0x08007E30 0x08007DE8 6880 LDR r0,[r0,#0x08] 0x08007DEA B2C0 UXTB r0,r0 0x08007DEC F88D0000 STRB r0,[sp,#0x00] 1066: LCD->LCD_RAM = U8_U16.usData; 0x08007DF0 F8BD0000 LDRH r0,[sp,#0x00] 0x08007DF4 F04F41D8 MOV r1,#0x6C000000 0x08007DF8 8048 STRH r0,[r1,#0x02] 1067: while((*((volatile unsigned long*)(PCLK_PORT+GPIOx_IDR)))&PCLK_PIN); // 等待PCLK的下降沿 1068: } 0x08007DFA BF00 NOP 0x08007DFC 480B LDR r0,[pc,#44] ; @0x08007E2C 0x08007DFE 6800 LDR r0,[r0,#0x00] 0x08007E00 F0100F01 TST r0,#0x01 0x08007E04 D1FA BNE 0x08007DFC 1036: for(i=0;i<320;i++) 0x08007E06 1C64 ADDS r4,r4,#1 0x08007E08 F5B47FA0 CMP r4,#0x140 0x08007E0C D38C BCC 0x08007D28 1069: while((*((volatile unsigned long*)(HREF_PORT+GPIOx_IDR)))&HREF_PIN); // 等待HREF的下降沿 1070: } 0x08007E0E BF00 NOP 0x08007E10 4806 LDR r0,[pc,#24] ; @0x08007E2C 0x08007E12 6800 LDR r0,[r0,#0x00] 0x08007E14 F4105F00 TST r0,#0x2000 0x08007E18 D1FA BNE 0x08007E10 1023: for(j=0;j<240;j++) 0x08007E1A 1C6D ADDS r5,r5,#1 0x08007E1C 2DF0 CMP r5,#0xF0 0x08007E1E F4FFAF57 BCC.W 0x08007CD0 1071: __set_PRIMASK(0); 0x08007E22 2000 MOVS r0,#0x00 0x08007E24 F7F8F9A5 BL.W __set_PRIMASK (0x08000172) 1072: } 0x08007E28 BD38 POP {r3-r5,pc} 0x08007E2A 0000 MOVS r0,r0 0x08007E2C 0C08 LSRS r0,r1,#16 0x08007E2E 4001 ANDS r1,r1,r0 0x08007E30 1000 ASRS r0,r0,#0 0x08007E32 4001 ANDS r1,r1,r0 |
|