Skip to content

Commit

Permalink
Periodic scheduler using timer
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth977 committed Mar 17, 2024
1 parent 30d9422 commit dd0552d
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 87 deletions.
80 changes: 80 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# A .gitignore for Keil projects.
# Taken mostly from http://www.keil.com/support/man/docs/uv4/uv4_b_filetypes.htm

# User-specific uVision files
*.opt
*.uvopt
*.uvoptx
*.uvgui
*.uvgui.*
*.uvguix.*

# Listing files
*.cod
*.htm
*.i
*.lst
*.map
*.m51
*.m66
# define exception below if needed
*.scr

# Object and HEX files
*.axf
*.b[0-3][0-9]
*.hex
*.d
*.crf
*.elf
*.hex
*.h86
*.lib
*.obj
*.o
*.sbr

# Build files
# define exception below if needed
*.bat
*._ia
*.__i
*._ii

# Generated output files
/Listings/*
/Objects/*

# Debugger files
# define exception below if needed
*.ini

# Other files
*.build_log.htm
*.cdb
*.dep
*.ic
*.lin
*.lnp
*.orc
# define exception below if needed
*.pack
# define exception below if needed
*.pdsc
*.plg
# define exception below if needed
*.sct
*.sfd
*.sfr

# Miscellaneous
*.tra
*.bin
*.fed
*.l1p
*.l2p
*.iex

# To explicitly override the above, define any exceptions here; e.g.:
# !my_customized_scatter_file.sct

120 changes: 45 additions & 75 deletions ChiliRTOS.uvprojx → ChiliRTOS_Periodic_Scheduler.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<Targets>
<Target>
<TargetName>ChiliRTOS</TargetName>
<TargetName>ChiliRTOS_STM32F411CEU6</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6180000::V6.18::ARMCLANG</pCCUsed>
Expand Down Expand Up @@ -183,7 +183,7 @@
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>2</RvdsVP>
<RvdsVP>1</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<nBranchProt>0</nBranchProt>
Expand Down Expand Up @@ -314,7 +314,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</Optim>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
Expand All @@ -323,7 +323,7 @@
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>2</wLevel>
<wLevel>3</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
Expand Down Expand Up @@ -382,33 +382,33 @@
</TargetOption>
<Groups>
<Group>
<GroupName>user</GroupName>
<GroupName>osKernel</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileName>osKernel.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
<FilePath>.\osKernel.c</FilePath>
</File>
<File>
<FileName>main.h</FileName>
<FileType>5</FileType>
<FilePath>.\main.h</FilePath>
<FileName>osKernel.s</FileName>
<FileType>2</FileType>
<FilePath>.\osKernel.s</FilePath>
</File>
<File>
<FileName>Interrupts.h</FileName>
<FileName>osKernel.h</FileName>
<FileType>5</FileType>
<FilePath>.\Interrupts.h</FilePath>
</File>
<File>
<FileName>Interrupts.c</FileName>
<FileType>1</FileType>
<FilePath>.\Interrupts.c</FilePath>
<FilePath>.\osKernel.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>STM32F411CEUx_BSP</GroupName>
<GroupName>User</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
</File>
<File>
<FileName>README.md</FileName>
<FileType>5</FileType>
Expand All @@ -419,50 +419,35 @@
<FileType>5</FileType>
<FilePath>.\Abstract.txt</FilePath>
</File>
<File>
<FileName>STM32F4_RTOS_BSP.c</FileName>
<FileType>1</FileType>
<FilePath>.\STM32F4_RTOS_BSP.c</FilePath>
</File>
<File>
<FileName>STM32F4_RTOS_BSP.h</FileName>
<FileType>5</FileType>
<FilePath>.\STM32F4_RTOS_BSP.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>LCD_20x4</GroupName>
<GroupName>STM32F411CEUx_BSP</GroupName>
<Files>
<File>
<FileName>LCD_20x4.c</FileName>
<FileName>STM32F4_RTOS_BSP.c</FileName>
<FileType>1</FileType>
<FilePath>.\LCD_20x4.c</FilePath>
<FilePath>.\STM32F4_RTOS_BSP.c</FilePath>
</File>
<File>
<FileName>LCD_20x4.h</FileName>
<FileName>STM32F4_RTOS_BSP.h</FileName>
<FileType>5</FileType>
<FilePath>.\LCD_20x4.h</FilePath>
<FilePath>.\STM32F4_RTOS_BSP.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>osKernel</GroupName>
<GroupName>Interrupts</GroupName>
<Files>
<File>
<FileName>osKernel.c</FileName>
<FileName>Interrupts.c</FileName>
<FileType>1</FileType>
<FilePath>.\osKernel.c</FilePath>
<FilePath>.\Interrupts.c</FilePath>
</File>
<File>
<FileName>osKernel.h</FileName>
<FileName>Interrupts.h</FileName>
<FileType>5</FileType>
<FilePath>.\osKernel.h</FilePath>
</File>
<File>
<FileName>osKernel.s</FileName>
<FileType>2</FileType>
<FilePath>.\osKernel.s</FilePath>
<FilePath>.\Interrupts.h</FilePath>
</File>
</Files>
</Group>
Expand All @@ -477,94 +462,79 @@
</Targets>

<RTE>
<packages>
<filter>
<targetInfos/>
</filter>
<package name="CMSIS" schemaVersion="1.7.7" url="https://www.keil.com/pack/" vendor="ARM" version="6.0.0">
<targetInfos>
<targetInfo name="ChiliRTOS" versionMatchMode="fixed"/>
</targetInfos>
</package>
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1">
<targetInfos>
<targetInfo name="ChiliRTOS" versionMatchMode="fixed"/>
</targetInfos>
</package>
</packages>
<apis>
<api Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" exclusive="1">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</api>
</apis>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="6.0.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.7.7" url="https://www.keil.com/pack/" vendor="ARM" version="6.0.0"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 Framework Classic">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="ADC" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL DMA">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL Common">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="PWR" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL GPIO">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="TIM" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 HAL DMA">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.6.3" condition="STM32F4 CMSIS">
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</component>
</components>
Expand All @@ -586,31 +556,31 @@
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 Framework Classic"/>
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</file>
<file attr="config" category="source" condition="STM32F411xE_ARMCC" name="Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f411xe.s" version="2.6.8">
<instance index="0">RTE\Device\STM32F411CEUx\startup_stm32f411xe.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.6.3" condition="STM32F4 CMSIS"/>
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</file>
<file attr="config" category="header" name="MDK\Templates\Inc\stm32f4xx_hal_conf.h" version="1.8.1">
<instance index="0">RTE\Device\STM32F411CEUx\stm32f4xx_hal_conf.h</instance>
<component Capiversion="1.0.0" Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.8.1" condition="STM32F4 Framework Classic"/>
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c" version="2.6.8">
<instance index="0">RTE\Device\STM32F411CEUx\system_stm32f4xx.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.6.3" condition="STM32F4 CMSIS"/>
<package name="STM32F4xx_DFP" schemaVersion="1.7.2" url="https://www.keil.com/pack/" vendor="Keil" version="2.17.1"/>
<targetInfos>
<targetInfo name="ChiliRTOS"/>
<targetInfo name="ChiliRTOS_STM32F411CEU6"/>
</targetInfos>
</file>
</files>
Expand All @@ -619,7 +589,7 @@
<LayerInfo>
<Layers>
<Layer>
<LayName>ChiliRTOS</LayName>
<LayName>Basic_Blinky_F411CEU6_ROUNDR</LayName>
<LayPrjMark>1</LayPrjMark>
</Layer>
</Layers>
Expand Down
5 changes: 0 additions & 5 deletions Interrupts.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#include "Interrupts.h"
#include "STM32F4_RTOS_BSP.h"

TIM_HandleTypeDef htim2;
TIM_HandleTypeDef htim3;
TIM_HandleTypeDef htim4;
TIM_HandleTypeDef htim5;

uint32_t count2=0;
uint32_t count3=0;
uint32_t count4=0;
Expand Down
Loading

0 comments on commit dd0552d

Please sign in to comment.