Skip to content

Commit 54e2285

Browse files
committed
fixed timer interrupt
i only want to run the the contents in the clock while loop if an exti interrupt has been generated (it generates every 2Hz, 1/2= 0.5 seconds), this upon incrementing the timer in the timer interrupt i'll save a status flag signaling that an interrupt has occured.. this flag is the used in the if statement inside the while loop for the clock functionality
1 parent 5fc0a92 commit 54e2285

File tree

9 files changed

+1438
-1354
lines changed

9 files changed

+1438
-1354
lines changed

labs/lab3/.metadata/.plugins/org.eclipse.cdt.ui/global-build.log

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,3 +1731,78 @@ Finished building: default.size.stdout
17311731

17321732
Finished building: klocka_och_knapp.list
17331733

1734+
11:08:23 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
1735+
make -j8 all
1736+
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
1737+
../Core/Src/main.c: In function 'clock_mode':
1738+
../Core/Src/main.c:152:42: warning: unused variable 'S1' [-Wunused-variable]
1739+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1740+
| ^~
1741+
../Core/Src/main.c:152:36: warning: unused variable 'S2' [-Wunused-variable]
1742+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1743+
| ^~
1744+
../Core/Src/main.c:152:30: warning: unused variable 'M1' [-Wunused-variable]
1745+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1746+
| ^~
1747+
../Core/Src/main.c:152:24: warning: unused variable 'M2' [-Wunused-variable]
1748+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1749+
| ^~
1750+
../Core/Src/main.c:152:18: warning: unused variable 'H1' [-Wunused-variable]
1751+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1752+
| ^~
1753+
../Core/Src/main.c:152:12: warning: unused variable 'H2' [-Wunused-variable]
1754+
152 | uint16_t H2=1, H1=0, M2=5, M1=9, S2=3, S1=9;
1755+
| ^~
1756+
arm-none-eabi-gcc -o "klocka_och_knapp.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\JU\Microdata_Technology\Mikrodatateknik_HT2023\labs\lab3\klocka_och_knapp\STM32F411RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="klocka_och_knapp.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
1757+
Finished building target: klocka_och_knapp.elf
1758+
1759+
arm-none-eabi-size klocka_och_knapp.elf
1760+
arm-none-eabi-objdump -h -S klocka_och_knapp.elf > "klocka_och_knapp.list"
1761+
text data bss dec hex filename
1762+
18264 124 2052 20440 4fd8 klocka_och_knapp.elf
1763+
Finished building: default.size.stdout
1764+
1765+
Finished building: klocka_och_knapp.list
1766+
1767+
11:09:44 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
1768+
make -j8 all
1769+
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
1770+
arm-none-eabi-gcc -o "klocka_och_knapp.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\JU\Microdata_Technology\Mikrodatateknik_HT2023\labs\lab3\klocka_och_knapp\STM32F411RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="klocka_och_knapp.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
1771+
Finished building target: klocka_och_knapp.elf
1772+
1773+
arm-none-eabi-size klocka_och_knapp.elf
1774+
arm-none-eabi-objdump -h -S klocka_och_knapp.elf > "klocka_och_knapp.list"
1775+
text data bss dec hex filename
1776+
18592 124 2052 20768 5120 klocka_och_knapp.elf
1777+
Finished building: default.size.stdout
1778+
1779+
Finished building: klocka_och_knapp.list
1780+
1781+
11:13:55 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
1782+
make -j8 all
1783+
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
1784+
arm-none-eabi-gcc -o "klocka_och_knapp.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\JU\Microdata_Technology\Mikrodatateknik_HT2023\labs\lab3\klocka_och_knapp\STM32F411RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="klocka_och_knapp.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
1785+
Finished building target: klocka_och_knapp.elf
1786+
1787+
arm-none-eabi-size klocka_och_knapp.elf
1788+
arm-none-eabi-objdump -h -S klocka_och_knapp.elf > "klocka_och_knapp.list"
1789+
text data bss dec hex filename
1790+
18672 124 2052 20848 5170 klocka_och_knapp.elf
1791+
Finished building: default.size.stdout
1792+
1793+
Finished building: klocka_och_knapp.list
1794+
1795+
11:30:58 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
1796+
make -j8 all
1797+
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
1798+
arm-none-eabi-gcc -o "klocka_och_knapp.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\JU\Microdata_Technology\Mikrodatateknik_HT2023\labs\lab3\klocka_och_knapp\STM32F411RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="klocka_och_knapp.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
1799+
Finished building target: klocka_och_knapp.elf
1800+
1801+
arm-none-eabi-size klocka_och_knapp.elf
1802+
arm-none-eabi-objdump -h -S klocka_och_knapp.elf > "klocka_och_knapp.list"
1803+
text data bss dec hex filename
1804+
18620 124 2060 20804 5144 klocka_och_knapp.elf
1805+
Finished building: default.size.stdout
1806+
1807+
Finished building: klocka_och_knapp.list
1808+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
10:22:19 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
1+
11:30:58 **** Incremental Build of configuration Debug for project klocka_och_knapp ****
22
make -j8 all
33
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F411xE -c -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/main.o"
44
arm-none-eabi-gcc -o "klocka_och_knapp.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\JU\Microdata_Technology\Mikrodatateknik_HT2023\labs\lab3\klocka_och_knapp\STM32F411RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="klocka_och_knapp.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
@@ -7,11 +7,11 @@ Finished building target: klocka_och_knapp.elf
77
arm-none-eabi-size klocka_och_knapp.elf
88
arm-none-eabi-objdump -h -S klocka_och_knapp.elf > "klocka_och_knapp.list"
99
text data bss dec hex filename
10-
18672 124 2052 20848 5170 klocka_och_knapp.elf
10+
18620 124 2060 20804 5144 klocka_och_knapp.elf
1111
Finished building: default.size.stdout
1212

1313
Finished building: klocka_och_knapp.list
1414

1515

16-
10:22:21 Build Finished. 0 errors, 0 warnings. (took 1s.397ms)
16+
11:30:59 Build Finished. 0 errors, 0 warnings. (took 1s.90ms)
1717

Binary file not shown.
Binary file not shown.
Binary file not shown.
2.01 KB
Binary file not shown.

0 commit comments

Comments
 (0)