Converted part of header comments to english, changed license text

master
Ondřej Hruška 9 years ago
parent c8ad62ff81
commit 26201d6236
  1. 31
      LICENSE
  2. 12
      lib/INI_ADC.s
  3. 12
      lib/INI_AES.s
  4. 12
      lib/INI_BASE.s
  5. 12
      lib/INI_COMP.s
  6. 12
      lib/INI_CRC.s
  7. 12
      lib/INI_DAC.s
  8. 12
      lib/INI_DBGMCU.s
  9. 12
      lib/INI_DMA.s
  10. 12
      lib/INI_EXTI.s
  11. 12
      lib/INI_FLASH.s
  12. 12
      lib/INI_FSMC.s
  13. 10
      lib/INI_GPIO.s
  14. 12
      lib/INI_I2C.s
  15. 12
      lib/INI_LCD.s
  16. 12
      lib/INI_NVIC.s
  17. 12
      lib/INI_OPAMP.s
  18. 12
      lib/INI_PWR.s
  19. 12
      lib/INI_RCC.s
  20. 12
      lib/INI_RI.s
  21. 12
      lib/INI_RTC.s
  22. 10
      lib/INI_SCB.s
  23. 12
      lib/INI_SDIO.s
  24. 12
      lib/INI_SPI.s
  25. 12
      lib/INI_SYSCFG.s
  26. 10
      lib/INI_SYSTICK.s
  27. 12
      lib/INI_TIM.s
  28. 12
      lib/INI_USART.s
  29. 12
      lib/INI_USB.s
  30. 12
      lib/INI_WDG.s
  31. 112
      main.asm

@ -1,27 +1,10 @@
The MIT License (MIT)
Contributors: Copyright (c) 2010 Michal Tomáš - part of the example program
Copyright (c) 2015 Petr Douša - conversion of CMSIS defintions to assembler
Copyright (c) 2015 Ondřej Hruška - library cleanup, bit-banding & missing definitions
Copyright (c) 2010 Michal Tomáš - část vzorového programu The library can be freely used for educational and non-commercial purposes,
Copyright (c) 2015 Petr Douša - základ knihovny dle CMSIS provided the copyright notices and header comments are retained.
Copyright (c) 2015 Ondřej Hruška - doplnění knihovny, Makefile
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Since a substantial portion of the library is derived from STM32 CMSIS, the original
license conditions should be respected.

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_ADC.S ; FILE : INI_ADC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro ADC ; DESCR : Bitove masky ridicich registru pro ADC
; ;
; Analog to Digital Converter (ADC) ; Analog to Digital Converter (ADC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,13 +1,15 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_AES.S ; FILE : INI_AES.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro AES (crypto); ; DESCR : Bitove masky ridicich registru pro AES (crypto);
; ! Modul je pouze v STM32L162 ! ; ! Modul je pouze v STM32L162 !
; ;
; Advanced Encryption Standard (AES) ; Advanced Encryption Standard (AES)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,11 +1,13 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_BASE.S ; FILE : INI_BASE.S
; AUTOR : Ondrej Hruska ; AUTHOR : Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Zakladni soubor knihovny. Musi byt includovat pred vsemi ostatnimi. ; DESCR : Zakladni soubor knihovny. Musi byt includovat pred vsemi ostatnimi.
; Soubor definuje rozdeleni adresniho prostoru a adresy periferii. ; Soubor definuje rozdeleni adresniho prostoru a adresy periferii.
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_COMP.S ; FILE : INI_COMP.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro COMP (analogovy komparator) ; DESCR : Bitove masky ridicich registru pro COMP (analogovy komparator)
; ;
; Analog Comparators (COMP) ; Analog Comparators (COMP)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_CRC.S ; FILE : INI_CRC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro CRC (checksum generator) ; DESCR : Bitove masky ridicich registru pro CRC (checksum generator)
; ;
; CRC calculation unit (CRC) ; CRC calculation unit (CRC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_DAC.S ; FILE : INI_DAC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro DAC (digitalne-analogovy prevodnik) ; DESCR : Bitove masky ridicich registru pro DAC (digitalne-analogovy prevodnik)
; ;
; Digital to Analog Converter (DAC) ; Digital to Analog Converter (DAC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_DBGMCU.S ; FILE : INI_DBGMCU.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro DBGMCU (Debug MCU control) ; DESCR : Bitove masky ridicich registru pro DBGMCU (Debug MCU control)
; ;
; Debug MCU (DBGMCU) ; Debug MCU (DBGMCU)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_DMA.S ; FILE : INI_DMA.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro DMA (Direct memory access) ; DESCR : Bitove masky ridicich registru pro DMA (Direct memory access)
; ;
; DMA Controller (DMA) ; DMA Controller (DMA)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_EXTI.S ; FILE : INI_EXTI.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro EXTI (ext. interrupt) ; DESCR : Bitove masky ridicich registru pro EXTI (ext. interrupt)
; ;
; External Interrupt/Event Controller (EXTI) ; External Interrupt/Event Controller (EXTI)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************
;**************************************************************************** ;****************************************************************************

@ -1,13 +1,15 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_FLASH.S ; FILE : INI_FLASH.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro FLASH ; DESCR : Bitove masky ridicich registru pro FLASH
; ;
; FLASH, DATA EEPROM and Option Bytes Registers ; FLASH, DATA EEPROM and Option Bytes Registers
; (FLASH, DATA_EEPROM, OB) ; (FLASH, DATA_EEPROM, OB)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_FSMC.S ; FILE : INI_FSMC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro FSMC (ext. memory communication) ; DESCR : Bitove masky ridicich registru pro FSMC (ext. memory communication)
; ;
; Flexible Static Memory Controller ; Flexible Static Memory Controller
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,11 +1,13 @@
;**************************************************************************** ;****************************************************************************
; SOUBOR : INI_GPIO.S ; FILE : INI_GPIO.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; ;
; General Purpose IOs (GPIO) ; General Purpose IOs (GPIO)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;**************************************************************************** ;****************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_I2C.S ; FILE : INI_I2C.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro I2C ; DESCR : Bitove masky ridicich registru pro I2C
; ;
; Inter-integrated Circuit Interface (I2C) ; Inter-integrated Circuit Interface (I2C)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_LCD.S ; FILE : INI_LCD.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro LCD ; DESCR : Bitove masky ridicich registru pro LCD
; ;
; LCD Controller (LCD) ; LCD Controller (LCD)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_NVIC.S ; FILE : INI_NVIC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro NVIC (system preruseni) ; DESCR : Bitove masky ridicich registru pro NVIC (system preruseni)
; ;
; Nested Vectored Interrupt Controller (NVIC) ; Nested Vectored Interrupt Controller (NVIC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_OPAMP.S ; FILE : INI_OPAMP.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro OPAMP ; DESCR : Bitove masky ridicich registru pro OPAMP
; ;
; Operational Amplifier (OPAMP) ; Operational Amplifier (OPAMP)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_PWR.S ; FILE : INI_PWR.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro PWR (napajeni, sleep...) ; DESCR : Bitove masky ridicich registru pro PWR (napajeni, sleep...)
; ;
; Power Control (PWR) ; Power Control (PWR)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_RCC.S ; FILE : INI_RCC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro RCC (nastaveni hodin) ; DESCR : Bitove masky ridicich registru pro RCC (nastaveni hodin)
; ;
; Reset and Clock Control (RCC) ; Reset and Clock Control (RCC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************
;**************************************************************************** ;****************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_RI.S ; FILE : INI_RI.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro RI (analogove propojky) ; DESCR : Bitove masky ridicich registru pro RI (analogove propojky)
; ;
; Routing Interface (RI) ; Routing Interface (RI)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_RTC.S ; FILE : INI_RTC.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro RTC (obvod realneho casu) ; DESCR : Bitove masky ridicich registru pro RTC (obvod realneho casu)
; ;
; Real-Time Clock (RTC) ; Real-Time Clock (RTC)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,11 +1,13 @@
;**************************************************************************** ;****************************************************************************
; SOUBOR : INI_SCB.S ; FILE : INI_SCB.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; System Control Block (SCB) ; System Control Block (SCB)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;**************************************************************************** ;****************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_SDIO.S ; FILE : INI_SDIO.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro SDIO ; DESCR : Bitove masky ridicich registru pro SDIO
; ;
; SD host Interface ; SD host Interface
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_SPI.S ; FILE : INI_SPI.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro SPI ; DESCR : Bitove masky ridicich registru pro SPI
; ;
; Serial Peripheral Interface (SPI) ; Serial Peripheral Interface (SPI)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_SYSCFG.S ; FILE : INI_SYSCFG.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro SYSCFG (EXTI routing atd.) ; DESCR : Bitove masky ridicich registru pro SYSCFG (EXTI routing atd.)
; ;
; System Configuration (SYSCFG) ; System Configuration (SYSCFG)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,11 +1,13 @@
;**************************************************************************** ;****************************************************************************
; SOUBOR : INI_SYSTICK.S ; FILE : INI_SYSTICK.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; ;
; System Timer (SysTick) ; System Timer (SysTick)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;**************************************************************************** ;****************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_TIM.S ; FILE : INI_TIM.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro TIM (casovace) ; DESCR : Bitove masky ridicich registru pro TIM (casovace)
; ;
; Timers (TIM) ; Timers (TIM)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_USART.S ; FILE : INI_USART.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro USART ; DESCR : Bitove masky ridicich registru pro USART
; ;
; Universal Synchronous Asynchronous Receiver Transmitter (USART) ; Universal Synchronous Asynchronous Receiver Transmitter (USART)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,12 +1,14 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_USB.S ; FILE : INI_USB.S
; AUTOR : Ondrej Hruska ; AUTHOR : Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro USB ; DESCR : Bitove masky ridicich registru pro USB
; ;
; Universal Serial Bus (USB) ; Universal Serial Bus (USB)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,14 +1,16 @@
;******************************************************************************** ;********************************************************************************
; SOUBOR : INI_WWDG.S ; FILE : INI_WWDG.S
; AUTOR : Petr Dousa, Ondrej Hruska ; AUTHOR : Petr Dousa, Ondrej Hruska
; DATUM : 10/2015 ; DATE : 10/2015
; POPIS : Bitove masky ridicich registru pro WWDG ; DESCR : Bitove masky ridicich registru pro WWDG
; ;
; Window WATCHDOG (WWDG) ; Window WATCHDOG (WWDG)
; ;
; Independent WATCHDOG (IWDG) ; Independent WATCHDOG (IWDG)
; ;
; Toto je soucast knihovny pro STM32L100 vyvijene na Katedre mereni FEL CVUT. ; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
; Developed for educational purposes at the Department of Measure of CTU in Prague.
; See the LICENSE file for detailed terms of use.
;******************************************************************************** ;********************************************************************************

@ -1,11 +1,10 @@
;*************************************************************************************************** ;***************************************************************************************************
;* ;*
;* Misto : CVUT FEL, Katedra Mereni ;* Place : CVUT FEL, Katedra Mereni
;* Prednasejici : Doc. Ing. Jan Fischer,CSc. ;* Lecturer : Doc. Ing. Jan Fischer,CSc.
;* Predmet : A4M38AVS, A4B38NVS ;* Subject : A4M38AVS, A4B38NVS
;* Vyvojovy Kit : STM32L100 DISCOVERY (STM32L100RC) ;* Development kit : STM32L100 DISCOVERY (STM32L100RC)
;* Datum : 12/2010, 10/2015 ;* Authors : Michal TOMAS (2010), Ondrej Hruska (2015)
;* Autor : Michal TOMAS (2010), Ondrej Hruska (2015)
;* ;*
;*************************************************************************************************** ;***************************************************************************************************
@ -14,25 +13,25 @@
;* Include library files ;* Include library files
;*************************************************************************************************** ;***************************************************************************************************
; Base library file ; Base library file
GET lib/INI_BASE.s GET lib/INI_BASE.s
; Peripheral modules ; Peripheral modules
GET lib/INI_GPIO.s GET lib/INI_GPIO.s
GET lib/INI_SYSTICK.s GET lib/INI_SYSTICK.s
GET lib/INI_RCC.s GET lib/INI_RCC.s
GET lib/INI_FLASH.s GET lib/INI_FLASH.s
;*************************************************************************************************** ;***************************************************************************************************
;* Start program AREA and pass compiler flags to the startup script... ;* Start program AREA and pass compiler flags to the startup script...
;*************************************************************************************************** ;***************************************************************************************************
AREA MAIN, CODE, READONLY AREA MAIN, CODE, READONLY
; This is a compiler flag imported by the startup script. ; This is a compiler flag imported by the startup script.
__use_two_region_memory __use_two_region_memory
EXPORT __use_two_region_memory EXPORT __use_two_region_memory
;*************************************************************************************************** ;***************************************************************************************************
@ -41,13 +40,14 @@ __use_two_region_memory
;* Called by the startup script before calling __main ;* Called by the startup script before calling __main
;*************************************************************************************************** ;***************************************************************************************************
SystemInit SystemInit PROC
EXPORT SystemInit ; Export the address to startup script EXPORT SystemInit ; Export the address to startup script
PUSH {LR} PUSH {LR}
BL RCC_CNF ; Configure clock sources BL RCC_CNF ; Configure clock sources
BL GPIO_CNF ; Configure GPIO power and pin settings BL GPIO_CNF ; Configure GPIO power and pin settings
BL SYSTICK_CNF ; Configure SysTick timer BL SYSTICK_CNF ; Configure SysTick timer
POP {PC} POP {PC}
ENDP
@ -55,8 +55,8 @@ SystemInit
;* Interrupt handlers... ;* Interrupt handlers...
;*************************************************************************************************** ;***************************************************************************************************
SysTick_Handler SysTick_Handler PROC
EXPORT SysTick_Handler ; Export the address to startup script (replaces a WEAK stub) EXPORT SysTick_Handler ; Export the address to startup script (replaces a WEAK stub)
PUSH {LR} PUSH {LR}
; Toggle the PC8 LED (bit-banding access) ; Toggle the PC8 LED (bit-banding access)
@ -72,6 +72,7 @@ SysTick_Handler
; STR R1, [R0] ; STR R1, [R0]
POP {PC} POP {PC}
ENDP
@ -82,14 +83,11 @@ SysTick_Handler
;* __main is called only once, and does not return! ;* __main is called only once, and does not return!
;*************************************************************************************************** ;***************************************************************************************************
__main __main PROC
EXPORT __main ; Export the address to startup script EXPORT __main ; Export the address to startup script
ENTRY ; Marks the program entry point (shouldnt be here) LOOP ; Main loop
LOOP ; Main loop
; turn LED on ; turn LED on
LDR R0, =BB_GPIOC_ODR_8 ; bit-banding address LDR R0, =BB_GPIOC_ODR_8 ; bit-banding address
MOV R1, #1 MOV R1, #1
STR R1, [R0] STR R1, [R0]
@ -107,6 +105,7 @@ LOOP ; Main loop
BL DELAY BL DELAY
B LOOP B LOOP
ENDP
@ -116,11 +115,11 @@ LOOP ; Main loop
;* Sets PC08 and PC09 as outputs, PA0 as input. ;* Sets PC08 and PC09 as outputs, PA0 as input.
;************************************************************************************************** ;**************************************************************************************************
GPIO_CNF GPIO_CNF PROC
PUSH {R0,R1,LR} PUSH {R0,R1,LR}
; Enable GPIO peripheral timing ; Enable GPIO peripheral timing
LDR R0, =RCC_AHBENR ; Advanced High-speed Bus ENable Register LDR R0, =RCC_AHBENR ; Advanced High-speed Bus ENable Register
LDR R1, [R0] LDR R1, [R0]
LDR R2, =(RCC_AHBENR_GPIOAEN :OR: RCC_AHBENR_GPIOCEN) LDR R2, =(RCC_AHBENR_GPIOAEN :OR: RCC_AHBENR_GPIOCEN)
ORR R1, R1, R2 ORR R1, R1, R2
@ -129,9 +128,9 @@ GPIO_CNF
; Output pins C8, C9 ; Output pins C8, C9
LDR R0, =GPIOC_MODER LDR R0, =GPIOC_MODER
LDR R1, [R0] LDR R1, [R0]
; Clear the area we'll write to ; Clear the area we'll write to
BIC R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9) BIC R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9)
; Write "OUTPUT" pattern (0x5555...) masked to the two bits ; Write "OUTPUT" pattern (0x5555...) masked to the two bits
ORR R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9) & GPIO_MODER_OUTPUT ORR R1,R1, #(GPIO_MODER_8 :OR: GPIO_MODER_9) & GPIO_MODER_OUTPUT
STR R1, [R0] STR R1, [R0]
@ -139,10 +138,12 @@ GPIO_CNF
LDR R0, =GPIOA_MODER LDR R0, =GPIOA_MODER
LDR R1, [R0] LDR R1, [R0]
BIC R1,R1, #GPIO_MODER_0 BIC R1,R1, #GPIO_MODER_0
ORR R1,R1, #(GPIO_MODER_0 & GPIO_MODER_INPUT); Write the "input" pattern into the bit config area ; Write the "input" pattern into the bit config area
ORR R1,R1, #(GPIO_MODER_0 & GPIO_MODER_INPUT)
STR R1, [R0] STR R1, [R0]
POP {R0,R1,PC} POP {R0,R1,PC}
ENDP
@ -152,7 +153,7 @@ GPIO_CNF
;* Configures SysTick to fire a SysTick interrupt at 1 Hz ;* Configures SysTick to fire a SysTick interrupt at 1 Hz
;************************************************************************************************** ;**************************************************************************************************
SYSTICK_CNF SYSTICK_CNF PROC
PUSH {R0, R1, LR} PUSH {R0, R1, LR}
; Use the core clock (undivided) ; Use the core clock (undivided)
@ -176,6 +177,7 @@ SYSTICK_CNF
STR R1, [R0] STR R1, [R0]
POP {R0, R1, PC} POP {R0, R1, PC}
ENDP
@ -185,30 +187,31 @@ SYSTICK_CNF
;* Inputs: R0 = number of loop cycles ;* Inputs: R0 = number of loop cycles
;************************************************************************************************** ;**************************************************************************************************
DELAY DELAY PROC
PUSH {R2, LR} ; Push the changed registers & link register PUSH {R2, LR} ; Push the changed registers & link register
WAIT_OUTER ; Outer loop WAIT_OUTER ; Outer loop
LDR R2, =40000 ; Length of inner loop LDR R2, =40000 ; Length of inner loop
; Inner loop ; Inner loop
WAIT_INNER SUBS R2, R2, #1 ; Decrement INNER loop counter WAIT_INNER SUBS R2, R2, #1 ; Decrement INNER loop counter
BNE WAIT_INNER ; Continue the loop if not done BNE WAIT_INNER ; Continue the loop if not done
SUBS R0, R0, #1 ; Decrement OUTER loop counter SUBS R0, R0, #1 ; Decrement OUTER loop counter
BNE WAIT_OUTER ; Continue the loop if not done BNE WAIT_OUTER ; Continue the loop if not done
POP {R2, PC} ; Pop & return POP {R2, PC} ; Pop & return
ENDP
;*************************************************************************************************** ;***************************************************************************************************
;* Konfigurace systemovych hodin a hodin periferii ;* Clock configuration
;* ;*
;* Nastavi hodiny na HSI 16 MHz ;* Set clock speed to 16 MHz
;************************************************************************************************** ;**************************************************************************************************
RCC_CNF RCC_CNF PROC
PUSH {R0, R1, LR} PUSH {R0, R1, LR}
; Flash timing configuration ; Flash timing configuration
@ -221,26 +224,14 @@ RCC_CNF
ORR R1, R1, #(FLASH_ACR_PRFTEN :OR: FLASH_ACR_LATENCY) ORR R1, R1, #(FLASH_ACR_PRFTEN :OR: FLASH_ACR_LATENCY)
STR R1, [R0] STR R1, [R0]
; Nastavit hodinove vstupy
LDR R0, =RCC_CR
; Additional RCC_CR config
; LDR R1, [R0]
; LDR R2, =RCC_CR_RTCPRE ; clear RTC prescaler
; BIC R1, R1, R2
; ; HseByp allows to use external clock source with HSEON
; LDR R2, =(RCC_CR_RTCPRE_DIV2 :OR: RCC_CR_HSEBYP)
; ORR R1, R1, R2
; STR R1, [R0]
; Power on HSI (runs from MSI on start) ; Power on HSI (runs from MSI on start)
LDR R0, =RCC_CR
LDR R1, [R0] LDR R1, [R0]
ORR R1, R1, #RCC_CR_HSION ORR R1, R1, #RCC_CR_HSION
STR R1, [R0] STR R1, [R0]
; Wait for HSIRDY ; Wait for HSIRDY
ALIGN
NO_HSI_RDY LDR R1, [R0] NO_HSI_RDY LDR R1, [R0]
TST R1, #RCC_CR_HSIRDY TST R1, #RCC_CR_HSIRDY
BEQ NO_HSI_RDY BEQ NO_HSI_RDY
@ -254,9 +245,10 @@ NO_HSI_RDY LDR R1, [R0]
STR R1, [R0] STR R1, [R0]
POP {R0, R1, PC} POP {R0, R1, PC}
ENDP
;************************************************************************************************** ;**************************************************************************************************
ALIGN ; Adds NOP if needed to complete a 32-bit word ALIGN ; Adds NOP if needed to complete a 32-bit word
END END

Loading…
Cancel
Save