Activate cache
This commit is contained in:
parent
902141e8b6
commit
a9c0f1b148
@ -21,6 +21,7 @@
|
||||
#include "spi.h"
|
||||
#include "gpio.h"
|
||||
#include "../../nokia.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern void ScreenSaver(void);
|
||||
|
||||
@ -94,16 +95,31 @@ int main(void)
|
||||
|
||||
Nokia_Init();
|
||||
|
||||
|
||||
uint32_t oldTick=HAL_GetTick();
|
||||
uint32_t newTick=oldTick;
|
||||
uint32_t fps=0;
|
||||
|
||||
SCB_EnableICache();
|
||||
SCB_EnableDCache();
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while (1) {
|
||||
|
||||
newTick=HAL_GetTick();
|
||||
|
||||
if(newTick-oldTick>1000)
|
||||
{
|
||||
oldTick=newTick;
|
||||
printf("FPS: %d\r\n",fps);
|
||||
fps=0;
|
||||
}
|
||||
|
||||
ScreenSaver();
|
||||
NokiaUpdate();
|
||||
fps++;
|
||||
|
||||
|
||||
/* USER CODE END WHILE */
|
||||
|
File diff suppressed because one or more lines are too long
@ -145,27 +145,10 @@
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ST-LINKIII-KEIL_SWO</Key>
|
||||
<Name>-U-O142 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(5BA02477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F746NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
|
||||
<Name>-U0671FF485057775187222225 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(5BA02477) -L00(0) -TO131075 -TC216000000 -TT10000000 -TP21 -TDS806B -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN1 -FF0STM32F7x_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F746NGHx$CMSIS\Flash\STM32F7x_1024.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>60</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134225208</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>..\nokia.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\DMA\../nokia.c\60</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<Breakpoint/>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
|
Binary file not shown.
@ -28,9 +28,8 @@ Project File Date: 12/11/2023
|
||||
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
|
||||
Build target 'DMA'
|
||||
compiling main.c...
|
||||
compiling nokia.c...
|
||||
linking...
|
||||
Program Size: Code=8818 RO-data=530 RW-data=44 ZI-data=2796
|
||||
Program Size: Code=9270 RO-data=530 RW-data=44 ZI-data=2796
|
||||
FromELF: creating hex file...
|
||||
"DMA\DMA.axf" - 0 Error(s), 0 Warning(s).
|
||||
|
||||
@ -64,7 +63,7 @@ Package Vendor: Keil
|
||||
|
||||
* Component: Keil.ARM Compiler::Compiler:I/O:STDOUT:ITM:1.2.0
|
||||
Source file: Source\retarget_io.c
|
||||
Build Time Elapsed: 00:00:04
|
||||
Build Time Elapsed: 00:00:03
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
1197
MDK-ARM/DMA/DMA.hex
1197
MDK-ARM/DMA/DMA.hex
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1450
MDK-ARM/DMA/DMA.map
1450
MDK-ARM/DMA/DMA.map
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_pwr_ex.h)(0x63986EB5)
|
||||
I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_spi.h)(0x63986EB5)
|
||||
I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_spi_ex.h)(0x63986EB5)
|
||||
I (..\nokia.h)(0x59F2D6FE)
|
||||
F (..\nokia.c)(0x6577114C)(--c99 -c --cpu Cortex-M7.fp.sp -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_DMA
-IC:\Keil_v5\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Keil_v5\Keil\STM32F7xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include
-D__UVISION_VERSION="535" -D_RTE_ -DSTM32F746xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F746xx
-o dma\nokia.o --omf_browse dma\nokia.crf --depend dma\nokia.d)
|
||||
F (..\nokia.c)(0x65771669)(--c99 -c --cpu Cortex-M7.fp.sp -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_DMA
-IC:\Keil_v5\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Keil_v5\Keil\STM32F7xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include
-D__UVISION_VERSION="535" -D_RTE_ -DSTM32F746xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F746xx
-o dma\nokia.o --omf_browse dma\nokia.crf --depend dma\nokia.d)
|
||||
I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h)(0x63986EB5)
|
||||
I (../Core/Inc/stm32f7xx_hal_conf.h)(0x65770152)
|
||||
I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_rcc.h)(0x63986EB5)
|
||||
@ -80,7 +80,7 @@ I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x602577D4)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\assert.h)(0x602577D8)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\rt_sys.h)(0x602577DE)
|
||||
I (.\RTE\_DMA\RTE_Components.h)(0x65770B36)
|
||||
F (../Core/Src/main.c)(0x65771149)(--c99 -c --cpu Cortex-M7.fp.sp -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_DMA
-IC:\Keil_v5\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Keil_v5\Keil\STM32F7xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include
-D__UVISION_VERSION="535" -D_RTE_ -DSTM32F746xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F746xx
-o dma\main.o --omf_browse dma\main.crf --depend dma\main.d)
|
||||
F (../Core/Src/main.c)(0x6577170A)(--c99 -c --cpu Cortex-M7.fp.sp -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_DMA
-IC:\Keil_v5\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Keil_v5\Keil\STM32F7xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include
-D__UVISION_VERSION="535" -D_RTE_ -DSTM32F746xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F746xx
-o dma\main.o --omf_browse dma\main.crf --depend dma\main.d)
|
||||
I (../Core/Inc/main.h)(0x65770152)
|
||||
I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal.h)(0x63986EB5)
|
||||
I (../Core/Inc/stm32f7xx_hal_conf.h)(0x65770152)
|
||||
@ -115,6 +115,7 @@ I (../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_spi_ex.h)(0x63986EB5)
|
||||
I (../Core/Inc/spi.h)(0x65770151)
|
||||
I (../Core/Inc/gpio.h)(0x65770150)
|
||||
I (../Core/Src/../../nokia.h)(0x59F2D6FE)
|
||||
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x602577D4)
|
||||
F (../Core/Src/gpio.c)(0x65770150)(--c99 -c --cpu Cortex-M7.fp.sp -g -O3 --apcs=interwork --split_sections -I ../Core/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc -I ../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I ../Drivers/CMSIS/Include
-I.\RTE\_DMA
-IC:\Keil_v5\ARM\CMSIS\5.6.0\CMSIS\Core\Include
-IC:\Keil_v5\Keil\STM32F7xx_DFP\2.12.0\Drivers\CMSIS\Device\ST\STM32F7xx\Include
-D__UVISION_VERSION="535" -D_RTE_ -DSTM32F746xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F746xx
-o dma\gpio.o --omf_browse dma\gpio.crf --depend dma\gpio.d)
|
||||
I (../Core/Inc/gpio.h)(0x65770150)
|
||||
I (../Core/Inc/main.h)(0x65770152)
|
||||
|
Binary file not shown.
@ -34,3 +34,4 @@ dma\main.o: ../Drivers/STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_spi_ex.h
|
||||
dma\main.o: ../Core/Inc/spi.h
|
||||
dma\main.o: ../Core/Inc/gpio.h
|
||||
dma\main.o: ../Core/Src/../../nokia.h
|
||||
dma\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
nokia.c
10
nokia.c
@ -55,10 +55,12 @@ void NokiaControl(uint8_t controlByte) {
|
||||
HAL_TIMEOUT = 0x03U
|
||||
*/
|
||||
|
||||
if(HAL_SPI_Transmit(&hspi2, &controlByte, 1, 0)!=HAL_OK){
|
||||
HAL_SPI_Transmit(&hspi2, &controlByte, 1, 10);
|
||||
/*
|
||||
if(HAL_SPI_Transmit(&hspi2, &controlByte, 1, 10)!=HAL_OK){
|
||||
//#PROBLEM !!!
|
||||
printf("Error while sending Control Data\r\n");
|
||||
}
|
||||
}*/
|
||||
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(D_C_NOKIA_GPIO_Port, D_C_NOKIA_Pin, GPIO_PIN_SET);
|
||||
|
||||
@ -83,10 +85,12 @@ void NokiaData(uint8_t dataByte)
|
||||
HAL_TIMEOUT = 0x03U
|
||||
*/
|
||||
|
||||
HAL_SPI_Transmit(&hspi2, &dataByte, 1, 0);
|
||||
/*
|
||||
if(HAL_SPI_Transmit(&hspi2, &dataByte, 1, 0)!=HAL_OK){
|
||||
//#PROBLEM !!!
|
||||
printf("Error while sending Control Data\r\n");
|
||||
}
|
||||
} */
|
||||
HAL_GPIO_WritePin(CS_NOKIA_GPIO_Port, CS_NOKIA_Pin, GPIO_PIN_SET);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user