stm32f103c8t6 | stm32f10x系列基础服务框架,作为stm32的工程模板和硬件驱动。项目集成kernel io

 by   zhangoneone C Version: Current License: GPL-3.0

kandi X-RAY | stm32f103c8t6 Summary

kandi X-RAY | stm32f103c8t6 Summary

stm32f103c8t6 is a C library typically used in Internet of Things (IoT) applications. stm32f103c8t6 has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

stm32f10x系列基础服务框架,作为stm32的工程模板和硬件驱动。项目集成kernel io fs shell tcpip等基础服务框架
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              stm32f103c8t6 has a low active ecosystem.
              It has 10 star(s) with 6 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              stm32f103c8t6 has no issues reported. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of stm32f103c8t6 is current.

            kandi-Quality Quality

              stm32f103c8t6 has no bugs reported.

            kandi-Security Security

              stm32f103c8t6 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              stm32f103c8t6 is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              stm32f103c8t6 releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stm32f103c8t6
            Get all kandi verified functions for this library.

            stm32f103c8t6 Key Features

            No Key Features are available at this moment for stm32f103c8t6.

            stm32f103c8t6 Examples and Code Snippets

            No Code Snippets are available at this moment for stm32f103c8t6.

            Community Discussions

            QUESTION

            Difference between an Address and a register (MCU addresses) and related questions
            Asked 2021-Feb-10 at 01:13

            I am getting a little bit deeper in exploring the STM32's MCU and I went bare metal. I am using an STM32F103C8T6 BluePill.

            Just to make sure I'm fully understanding what is going on, what is the nature of the addresses of the MCU? I mean, for my board, the RCC boundary address is 0x4002 1000 - 0x4002 13FF and by creating a custom named pointer to this address and type casing this "0x40021000" to be treated as an actual address by the compiler, is this an address of an actual register?

            I mean what I understood is that the MCU has 32bit registers, those registers have addresses, those addresses are the addresses of the registers and each 32bit register in the MCU has a unique address, a physical one! And therefore to manipulate a specific register we create a pointer to the address of that register and then dereferencing the pointer and change the register it is pointing to.

            For example, the RCC address starts at "0x40021000" and this address is of the register 0x0000XX83 (where X is undefined as per the reference manual), Am I right? Do those registers actually have addresses in the MCU so they can be accessed and manipulated? If so, are those registers bits are just transistors where when setting a bit in that register to 1 the transistor turns on?

            Also if what I understood was correct, does that mean that the Reset Values are the actual register values which have addresses (as in registers are analogous to variables e.g x,y, etc.. and there addresses are those in the reference manual as in RCC address = 0x40021000 and dereferencing this address gives us 0x0000XX83 ??

            I know I might have confused you but this is the best I can explain! Thank you in advance.

            ...

            ANSWER

            Answered 2021-Feb-09 at 22:45

            Addresses are addresses on the bus*. When the compiler generates an instruction for the processor to read an address (LDR) it asks the bus to fetch what is at that address. Similarly a write instruction (STR) tells the bus what the address is and what data it wants to put there.

            At the other end of the bus could be anything, but in most cases it will be either memory or a memory-mapped peripheral register. This could have any number of bits, but the most you can access in one go is 32. This is because the width of the bus is 32-bits. The datasheet lists the address ranges used by each peripheral, and the reference manual says what purpose of each peripheral register is.

            In your example the RCC is a peripheral, its address range is 0x40021000-0x400213FF. The first register in the RCC is RCC_CR, which has address offset 0x00, making its address equal to 0x40021000. 0x0000XX83 is the value of the RCC_CR register at boot.

            There are another set of registers which instructions can access directly. These are the processor core registers. Because they are not accessed through the bus they do not have an address. Most of the processor core registers have 32-bits and that is why the STM32 is called a 32-bit microcontroller.

            (*in a Harvard architecture part like the Cortex-M3 used in STM32F1 there are actually several buses sharing an address space but as a beginner I would suggest you can overlook that.)

            In terms of transistors, each bit in a register is usually made of more than 1 transistor. Often 6 transistors are wired together to make a flip-flop which represents a single bit.

            Source https://stackoverflow.com/questions/66127329

            QUESTION

            How to do bare-metal LED blink on STM32F103C8T6?
            Asked 2020-Nov-30 at 05:39

            I have just started exploring STM32 MCUs. I want to blink the LED on the BluePill(having STM32F103C8T6 MCU) board. I suspect I have been mislead by something. As per the Reference Manual of F1 series, There are 3 main steps:

            • Enable Clock for the PORT (here PORTC)
            • Configure The CNF/MODE registers
            • Configure ODR register as required i.e. HIGH/LOW on the pin.

            I have written the code in KEIL MDK as per the manual but after it is loaded, The code do not run, I press the reset button and then LED turns ON, even though I have changed Settings to RESET & RUN in KEIL.

            Here is the code and The parts of reference manual.

            ...

            ANSWER

            Answered 2020-Nov-23 at 15:18

            Actually the LED toggles inside the while loop ,but only in debug mode

            Yes, because that's the only time the generated machine code includes those delay loops. In release mode, the LED still toggless, except you need an oscilloscope or a logic analyzer to look at the output pin's state to see that it's toggling - you won't see it with just your eyes :)

            In release mode, the delay loops are removed, because you can't implement delays that way. Ideally you should use a timer, but as a quick hack this would work:

            Source https://stackoverflow.com/questions/64970233

            QUESTION

            Run STM32F103 from internal oscillator with PlatformIO (Arduino)?
            Asked 2020-Nov-04 at 08:35

            How can the STM32F103C8 be configured to run with internal RC oscillator / HSI & PLL, i.e. without external crystal oscillator (as present on the "blue pill" board) with the Arduino framework in PlatformIO?

            platformio.ini:

            ...

            ANSWER

            Answered 2020-Nov-03 at 13:49

            I dug around a bit in the PlatformIO directory.

            The following paths are for "generic":

            • C:\Users\\.platformio\platforms\ststm32\boards\genericSTM32F103C8.json
            • C:\Users\\.platformio\packages\framework-arduinoststm32\variants\Generic_F103Cx\variant.cpp

            Define your own system clock configuration in e.g. your main.cpp:

            Source https://stackoverflow.com/questions/64646976

            QUESTION

            How to write an algorithm that receives characters one by one and displays them in the form of book with pages?
            Asked 2020-Apr-23 at 15:48

            My code currently receives characters of a book one by one and preprocesses it so that it displays it in the form of:

            I went to the
            library to pick up
            my favorite
            baseball hat

            instead of

            I went to the libr
            art to pick up my
            favorite basebal
            l hat

            which is what the default Adafruit_ST7735.h wrap text option would do. Everything works properly but now I'm struggling to implement pages functionality. I want to be able to enter a page number and the function displays the preprocessed text only of that page (where the pages are determined by dividing the whole book size by the number of characters that the display can fit). It is a pretty complicated system and I've been banging my head for hours but it seems to be way beyond my IQ. Here's the code of my void: (where the characters are read from a file on an SD card) I can't explain how it works but a quick read through the if statements should give an idea of what it happens. I believe that the main issues arise when the go-to-new-line-when-word-doesn't-fit system causes miscalculations of what space of the page is taken and it starts to mess up the text. Another issue I suspect is that it would need to somehow calculate pages it has passed so it can display the current page properly. And also, when the final word doesn't fit at the space left at the end of the page, it goes to the next line, but it's not displayed on the next page. Maybe there's a better way to do this whole system and maybe there's a library or a ready-to-use algorithm somewhere. I'm ready to rewrite the whole thing if I have to.

            ...

            ANSWER

            Answered 2020-Apr-23 at 15:37

            Not having a stm32f103c8t6 board or any way to debug your exact code best I can give is a psudocode solution.

            if you preprocess the file so that each "page" is exactly the amount of characters you can fit on the screen (filling the end of each line with spaces) you should be able to use the page number as the offset into the file.

            Source https://stackoverflow.com/questions/61389780

            QUESTION

            Enabling an output port in stm32f103c8t6 Blue Pill
            Asked 2020-Apr-13 at 13:54

            I'm trying to enable the PC13 in the Blue Pill (stm32f103c8t6) which is connected to an LED, not sure if it is active low or active high so i tried both still doesn't work.

            RCC->APB2ENR |= 0x10;
            is used for enabling the clock in Port C.




            GPIOC->CRH = (GPIOC->CRH & 0xFF0FFFFF) | 0x00100000;
            is used to configure the port C to be in Output mode and Push-Pull.




            GPIOC->ODR &= !(1<<13); is used to drive the C13 pin to LOW.

            The whole code:

            ...

            ANSWER

            Answered 2020-Apr-13 at 13:54

            If you are running Keil as you've said in your comments than it is quite certain that you are using the ST HAL. As such you should use it.

            Use this to enable the GPIOC clock

            Source https://stackoverflow.com/questions/61179208

            QUESTION

            Build Fail arm-none-eabi-gcc
            Asked 2020-Apr-06 at 17:12

            I got into the book "Beginning STM32" - Warren Gay. I tried to build the sources under Cygwin, but even if the path to the required files is denoted in the makefile, the required files were not found.The file in the folders libopencm3/cm3/scb.h lays in the path: /home/root/STM32/stm32f103c8t6/libopencm3/include so the correct path should be /home/root/STM32/stm32f103c8t6/libopencm3/include/libopencm3/cm3/scb.h and I checked the presence of the files.

            So I tried to change the #include into #include "file.h" with the required header file in the source folder - this worked, but there are a lot of cases in different source files.

            Is there any suggestion to get this fixed or to find a way to get out of this?

            Thanks a lot!

            This is what I got from the terminal.

            ...

            ANSWER

            Answered 2020-Apr-06 at 17:12

            So, I know what is the source of the problem. There are problems in Cygwin with the path format or rather between the interaction between the Windows and Linux path formats. I could solve the problem by changing the paths in the Makefile from the Linux /home/folder to the Windows D:\home\folder\ format.

            Source https://stackoverflow.com/questions/61026530

            QUESTION

            How do you use CMSIS without an IDE?
            Asked 2020-Feb-11 at 14:21

            I am working with STM32F103C8T6 and would like to use CMSIS, which is essentially just register definitions and no code, to make my life easier while still staying at a low level. The problem is that I have no idea how to install the library for use on the command line with Makefile. All documentation seems to be bound with a vendor-specific IDE like STM32CubeIDE.

            I suppose the first thing to do is to download the CMSIS library, which I found on GitHub. However, after unzipping ARM.CMSIS.5.6.0.pack I found no files named stm32f10x.h. I spend some more time and found a CMSIS pack for the specific MCU I'm using, but it doesn't contain core_cm3.h, which however presents in ARM.CMSIS.5.6.0.pack. The document says I need to include both to my project, so do I need to copy the files downloaded from different places to my project, or what?

            As a bonus question: what is the relationship between CMSIS and Keli? The device-specific CMSIS pack is downloaded from www.keil.com, but I don't want to use Keil MDK for now, as it appears to be a commercial product, and the GNU Arm toolchain is serving me pretty well.

            Edit: I should have been more specific from the beginning, but now let's focus on how to build the Basic CMSIS Example as a minimal, complete and verifiable example.

            What I have done:

            1. Download and unzip CMSIS-Core and CMSIS-DFP to /Users/nalzok/Developer/CMSIS/ARM.CMSIS.5.6.0/ and /Users/nalzok/Developer/CMSIS/Packs/Keil.STM32F1xx_DFP.2.3.0/, respectively.
            2. Create a file named main.c, and copy the content of the basic example to it.
            3. Add #define STM32F10X_MD on the very first line to specify the chip.
            4. Fix typos: replace the : on line 31 to ;, and replace line 33 to timer1_init (42);.
            5. Build and get an error
            ...

            ANSWER

            Answered 2020-Feb-10 at 23:48

            For the part of CMSIS your are referring to, some is supplied by ARM (CMSIS core) and some is supplied by your chip vendor (Device Family Pack). As you have discovered, CMSIS software packs are just zip files by another name. You may unzip them wherever you wish. As you are aware, core CMSIS and most of the vendor specific part consists of just header files. It is then necessary to include the proper directories in the compiler include path, typically using -I... command line options.

            One type of vendor software pack is called a Device Family Pack. In addition to vendor specific peripheral definitions, they usually contain start up code and often times linker scripts that match the layout of the SOC memory. These are worth finding and will save the work of vector table layout and other such low level code.

            For the bonus: Keil is a maker of software tools and is owned by ARM. The nicer features of CMSIS software packs, like distributing and updating them over a network, are supported by the Keil IDE and Keil maintains a repository of common SOC packs. I also usually use the GNU compiler, but have used Keil and its built-in CMSIS awareness and software pack availablity to good effect. I have even built a few software packs for custom work. I suggest a continued reading of the CMSIS documentation paying some attention to the section on packs. You don't have to have an IDE that manages the packs for you. Since they are simply zip files, you undertake that task yourself.

            Source https://stackoverflow.com/questions/60158918

            QUESTION

            Understanding the linker scripts for STM32F103C8T6
            Asked 2020-Feb-04 at 22:17

            I have recently got into STM32F103C8T6 bare-metal programming, and the linker script implementation seems a little confusing. I found two versions of linker scripts online, and surprisingly both work as expected, despite the huge difference in their contents.

            Version 1, as used here

            ...

            ANSWER

            Answered 2020-Feb-04 at 22:17

            Okay so maybe it is something I can answer didnt understand your question in the comment of another question.

            The processor boots looking for a vector table at address 0x00000000 in arms address space. ST has implemented their part such that application flash is at address 0x08000000 in the arms address space.

            Depending on the boot mode ST can if you will mirror either the built in bootloader program to address 0x00000000 or the application. Such that arm accesses to address 0x00000000 will return with values found in a flash. If mirroring the application then both 0x00000000 and 0x08000000 will read values from the same physical flash device and return them. There is no magic here, the ARM bus has an address and amount of data it wants to read, the logic has masks and matches to determine which address space it is, then if 0x00000000 to some number of Kbytes, then if strap is one way read from one flash bank else read from another. Likewise with writes.

            Search for BOOT0 in the reference manual for the part.

            Ideally you want to link for 0x08000000 (or 0x00200000 for some of the parts but not all) so that the vector table entries read at 0x00000004, 0x00000008 and so on return 0x0800xxxx addresses, that way only the vector table is actually read from 0x00000000 and then the rest of the program in the application address space. You will see in the docs that the 0x00000000 address space for parts with a lot of flash does not support the whole size of the flash so you couldnt use all of the flash if you link for 0x00000000

            now these linker scripts are interesting, first off if you see this in a vector table for a cortex-m

            Source https://stackoverflow.com/questions/60062414

            QUESTION

            How much exception vectors should I fill in the firmware?
            Asked 2020-Feb-04 at 20:38

            I'm playing with ARM using an STM32F103C8T6 Blue Pill board. According to its Programming Manual (Section 2.3.4 Vector Table), there are a total of 83 exception vectors to be set. However, this tutorial only fills the first 6 and this tutorial the first 10. Curiously, I can verify that both firmware executes as expected, despite the absence of a lot of exception handlers.

            Just to clarify, below is the very part I am referring to (link to original file). As you can see, only the first few words get assigned a handler, and all subsequent space is used to hold the .text section.

            ...

            ANSWER

            Answered 2020-Feb-04 at 10:05

            theoretically you can set only two. the initial stack and the reset handler. If you do not invoke any interrupts (and your program does not end up in the hard fault you do not have to set any

            Source https://stackoverflow.com/questions/60051953

            QUESTION

            How can i switch on LED on STM32F1 GPIO pin PA2?
            Asked 2020-Feb-03 at 22:14

            How can i switch on the LED on PA2 GPIO (STM32F103C8T6), using standard registry configuration.

            ...

            ANSWER

            Answered 2020-Feb-03 at 22:14

            As per the reference manual, the GPIOA CRL registers resets as 0x4444 4444 (See section 9.2.1 of the reference manual). When you execute the following command:

            Source https://stackoverflow.com/questions/59920888

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install stm32f103c8t6

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/zhangoneone/stm32f103c8t6.git

          • CLI

            gh repo clone zhangoneone/stm32f103c8t6

          • sshUrl

            git@github.com:zhangoneone/stm32f103c8t6.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link