stm32f103c8 | c and c++ Makefile version | Build Tool library

 by   MagicPrince666 C Version: Current License: No License

kandi X-RAY | stm32f103c8 Summary

kandi X-RAY | stm32f103c8 Summary

stm32f103c8 is a C library typically used in Utilities, Build Tool applications. stm32f103c8 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

c and c++ Makefile version
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

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

            kandi-Quality Quality

              stm32f103c8 has no bugs reported.

            kandi-Security Security

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

            kandi-License License

              stm32f103c8 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              stm32f103c8 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 stm32f103c8
            Get all kandi verified functions for this library.

            stm32f103c8 Key Features

            No Key Features are available at this moment for stm32f103c8.

            stm32f103c8 Examples and Code Snippets

            No Code Snippets are available at this moment for stm32f103c8.

            Community Discussions

            QUESTION

            data retention in stm32
            Asked 2021-May-25 at 07:48

            Presented data retention for STM32f103c8 in its datasheet is: "1 kcycle at T = 105c: 10 years".

            Can anyone explain this to me?

            1- What is 1 kcycle? is it 1000 cycle (why "k" is not in capital?

            2- What is a cycle? is it Write/Erase per minutes?

            3- Does this sentence mean that I can use it at 105 degrees of Celsius for 10 years while I write and erase data 1000 times in each minute?

            I'm putting the datasheet as a reference below.

            ...

            ANSWER

            Answered 2021-May-25 at 07:48

            k for kilo- (meaning 1000) is always always lower case, whatever the case of what surrounds it. Eg: km = kilometre; kPa = kilopascal.

            How I understand the datasheet is this:

            The maximum number of times that you should erase and write this part is 10000 times.

            If you erase and write the part 1000 times (1000 erases, 1000 writes) and then keep it at 85 degrees, the contents will be preserved for at least 30 years.

            If you erase and write the part 1000 times (1000 erases, 1000 writes) and then keep it at 105 degrees, the contents will be preserved for at least 10 years.

            If you erase and write the part 10000 times (10000 erases, 10000 writes) and then keep it at 55 degrees, the contents will be preserved for at least 20 years.

            All this data is obviously predicted. The process that these parts are made by has not been around for 30 yours for them to know this for certain.

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

            QUESTION

            STM32F103 blue pill - problems related to blinking led bare metal
            Asked 2021-Apr-17 at 08:04

            I come across a problem when trying to run this code in order to blink the built-in LED (located at PC13) on the blue pill board (STM32F103C8, ARM Cortex M3):

            ...

            ANSWER

            Answered 2021-Apr-17 at 08:04

            In the uVision project configuration dialog C/C++ tab, select "use C99".

            ISO C90 dies not allow declaration of variables in either a for statement or following non -declaritive code in a statement block.

            Alternatively move the declaration to the top of the statement block in which it is required. Better to use C99 though - it has been around long enough to be regarded as lowest common denominator standard I think!

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

            QUESTION

            STM32F103C8 LED blink
            Asked 2021-Apr-16 at 17:29

            I try to program an STM32F103C8 circuit. I use an ST-LINK V2 programmer. After running a sample of code that used special libraries, I was able to see the built-in LED ON, but now I want to program the board without using those libraries, and I don't know why I cannot see anything, the LED is OFF the whole time. Here is the code:

            ...

            ANSWER

            Answered 2021-Apr-16 at 16:10

            Based on the info that you have the LED on PC13, I assume you're using the famous Blue Pill board. In that board, LED connection is inverted because of the special limitations of PC13 - that pin should only sink current, not source. So, in order to turn it on, you need to write 0 to corresponding bit of ODR.

            Normally, I'm against the usage of magic numbers. But for STM32F103, using hex literals for GPIO configuration is practical, because one single hex digit uniquely defines the pin mode. One can memorize the meaning of hex literals for GPIO settings, and use them in a compact assignment which defines the 8 pins of a GPIO port at once. If you make GPIO configurations only once, you don't need &= or |= operators.

            Also, prefer using BSRR instead of ODR, because it allows atomic modification of output pins.

            Here is a LED blink example for Blue Pill board:

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

            QUESTION

            is stm32 erasing flash even it not writen?
            Asked 2021-Mar-03 at 04:31

            I'm using HAL_FLASHEx_Erase on stm32f103c8.

            According to datasheet, Flash memory endurance is just 10k cycles.

            my data is 16 bytes so i thought method how to use flash memory like little block with counter

            before i notice it erase 1 page each time.

            if i erase 1 page that having 16 bytes data at front

            is all other bytes in page become lose there endurance cycle even it not written?

            this is method what i thought

            it use next frame when it lost there endurance

            frame = data(16bytes) + counter(2bytes)

            page (1k bytes each) data 1 frame_pointer 2 frame1, frame2, frame3 ... 3 frame56, frame57, frame58 ... ...

            ANSWER

            Answered 2021-Feb-15 at 09:31

            Indeed, the entire page needs to be erased if an existing value needs to be changed such your frame pointer. The only exception is if the value has still the initial value after erase, which is hexadecimal FF FF FF FF...

            So the typical approach is to only append data until the page is full and to use the initial FF FF values to detect whether a slot has been used. In your case, it could look like so (note: I don't understand what the counter is for):

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

            QUESTION

            Why do the usual STM32 start ups define the vector table with fewer entries than in the reference manual?
            Asked 2020-Dec-23 at 10:11

            I'm learning low-level details of the STM32. I am puzzled by how the vector table is setup.

            In the reference manual, table 63, it lists the STM32F103C8's vector table. It goes from 0x00000000 through 0x00000130. However, if you look at the generated files from STM32CubeMX (like startup_stm32f103xb.s), you notice it only lists entries until 0x00000108, and at this address is the magic number 0xF108F85F, which I eventually found information about here.

            Why does the generated code's vector table have fewer entries than the reference manual's vector table? Are those last few entries not actually used, or they can somehow be omitted without consequence? Position 0x108 should be the handler for interrupt "TIM5 global interrupt". I don't know what this is but why is it that somehow the magic number above can be here instead of the actual handler?

            It begs a related but different question, which is that on some bare metal STM32 code, the only entries defined in the vector table are the stack pointer and the reset handler. No other handlers. What happens here? Are those interrupts disabled by default? Or is that that since those handlers are undefined, the mcu behaviour will be undefined should those interrupts occur and the code just assumes those interrupts will not happen?

            ...

            ANSWER

            Answered 2020-Dec-23 at 10:11

            The reference manual linked is for a big family, STM32F10xxx, of devices, and each target/mcu variant in the family will have varying hardware peripheral blocks and functions. The number of maskable interrupts supported by a target vary with the available peripheral block. As such, the vector table could be then be reduced subset of the table listed for the family of devices, if a particular in the family has a reduced subset of peripherals. Consequently, everything that follows the vector table is moved up.

            Looking through the product datasheet for the STM32F103C8 in specific, the peripheral blocks, as listed below, corresponding to the missing vectors are not available for the given target.

            • TIM5
            • UART4
            • UART5
            • TIM6
            • TIM7
            • DMA2

            See table 2 in the product datasheet for an overview of the available peripheral blocks.

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

            QUESTION

            Why does Curve25519 calculate key pair correctly even though its parameters are wrong?
            Asked 2020-Dec-02 at 12:00

            It seems that .NET (Core 3.1) supports custom curves in ECC. So I've defined the Curve25519, and generated key pair by below code:

            ...

            ANSWER

            Answered 2020-Nov-30 at 16:20

            I don't know the libs you mention, but I do know a fair bit about curve25519.

            ECDH is of course the act of taking a counterparts public key point (really k[G], where k is their private key (a clamped 256-bit number) and G is the curve's generator point), and multiplying it by your private key, yielding yourK * theirK * G.

            This process is commutative which is why it works when the counterpart does the same with your public key and their private key.

            Now, as to why the curve parameters seemingly don't matter. curve25519 is a highly highly optimised elliptic curve crypto-system. The scalar multiplication is optimised (variable base scalar multiplication used for ECDH), the point arithmetic is optimised, etc. The multiplication is executed using only the X-coordinate and differential additions. See here for details.

            X25519 (curve25519+ECDH) exclusively uses "X-only" scalar multiplication, where points are represented only by their X coordinate. This is one of the fastest and simplest way to do key exchange in constant time, constant time is important for side-channel timing attacks.

            The only time the curve is actually needed is when we execute EdDSA point decompression. EdDSA points wire format is made of the Y coordinate, and the sign of the X coordinate.

            It's not that the curve is ignored, of course, elliptic curve operations must respect the underlying curve over which they operate and indeed the Galois field over which that curve is defined, it's more that the computation which is being used is guaranteed to stay on the curve by definition.

            If you're zeroing all parameters, that's weird, but if you're still leaving the field (Prime in your case), as 2^255 - 19, this must be enough for the ECDH class to know what to do.

            Thus, in short, I think it's likely not actually using the curve equation in the ECDH calculations.

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

            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

            Question about the Cortex-M3 vector table placement
            Asked 2020-Oct-15 at 07:19

            I am trying to understand the placement of the vector table for Cortex-M3 processor.

            According to the Cortex-M3 arch ref manual, the reset behavior is like this (some parts are omitted):

            So, we can see that the vectortable comes from the VTOR (Vector Table Offset Register).

            According to the Cortex-M3 tech ref manual, the VTOR is defined as:

            So we can see, it has a reset value of 0x0. So based on the above 2 criteria, the Cortex-M3 processor expects a vector table at the absolute address 0x0 in the Code area after reset.

            But in my MDK uVision IDE, I see my application is placed in the IROM1 area, which starts at 0x8000000, which is within the 0.5G Code memory area according to the Cortex-M3 memory map.

            And since it has the Starup button checked, I guess that means the IROM1 area should contain the vector table (please correct me if I am wrong about this).

            So I think the vector table should lie at the beginning of IROM1 area, i.e. 0x8000000. And it is indeed so. Below pic shows that at the beginning of IROM1, it is the vector table's 1st entry, the SP value.

            And what's more strange, the VTOR register (at 0xE000ED08) still holds a 0x0 value:

            So, how could my vector table be found with a 0x0 VTOR reset value?

            And just out of curiosity, I checked the memory content at 0x0, there contains exactly the same vector table content as IROM1. So who did this magic copy??

            ADD 1 - 4:39 PM 10/9/2020

            I guess there must be something I don't know about the startup check box in below pic.

            ADD 2 - 5:09 PM 10/9/2020

            Thanks to @RealtimeRik and @domen. I downloaded the datasheet for STM32F103x8_xB(https://www.st.com/resource/en/datasheet/stm32f103c8.pdf). In section 4 Memory mapping, I saw below diagram:

            So it seems the [0x0, 0x8000000) range does get aliased to somewhere else. But I haven't found how to determine where it is aliased to...

            ADD 3 - 5:39 PM 10/9/2020

            Now I found it!

            I downloaded the STM32Fxxx fef manual (btw it's really huge).

            In section 3.4 Boot configuration, it specifies the boot mode configured through the BOOT[1:0] pins.

            And with different boot mode, different address aliasing is used:

            Depending on the selected boot mode, main Flash memory, system memory or SRAM is accessible as follows:

            • Boot from main Flash memory: the main Flash memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x800 0000). In other words, the Flash memory contents can be accessed starting from address 0x0000 0000 or 0x800 0000.
            • Boot from system memory: the system memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x1FFF B000 in connectivity line devices, 0x1FFF F000 in other devices).
            • Boot from the embedded SRAM: SRAM is accessible only at address 0x2000 0000.

            What I saw is Boot from main Flash memory.

            Well finally I can explain why 0x800 0000 is chosen...

            ADD 4 - 3:19 PM 10/15/2020

            The placement/expectation of the interrupt vector table at the address 0 is similar to the IA32 processor in real mode...

            ...

            ANSWER

            Answered 2020-Oct-09 at 08:04

            There is no "Magic Copy". 0x00000000 is aliased to 0x08000000.

            The actual memory is physically located at 0x08000000 but can also be access at 0x00000000.

            If you look in the processor specific reference manual you should find this in the the memory map section.

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

            QUESTION

            Rust STM32: webUSB publishing sensors
            Asked 2020-Mar-23 at 18:44

            For a hobby project using the stm32f1xx-hal, I'm wanting to periodically read a sensor and then push the values such that I can graph them realtime in a webUSB app.

            I have found an example in webusb_blinky by mvirkkunen which demonstrates the connectivity portion, but it's not clear to me how I would adapt it to publish sensor values. Should I be overriding control_in?

            Any suggestions/help would be appreciated. Thanks!

            ...

            ANSWER

            Answered 2020-Mar-23 at 18:44

            You could define a control transfer that requested the device respond with the current sensor values but the more natural USB mechanism for publishing sensor updates is with an IN endpoint.

            The usbd-serial module is the best example I can find of creating and using endpoints with this framework. A serial port consists of both an IN and OUT endpoint for bidirectional streaming of data. For your application you would only need the IN endpoint since the device only generates data.

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

            QUESTION

            STM32F103C8T6 board not flashing with Keil 5
            Asked 2020-Feb-18 at 14:22

            I have the following problem. Once i generate Keil project using ST CubeMX and write project into STM32F103C8 MCU, everything goes well; However, after this first flashing i'am not able to flash it anymore as it throws the following error:

            ...

            ANSWER

            Answered 2020-Feb-18 at 14:22

            Problem was in default configuration of STM CubeMx. In System core -> Sys Debug was switched off by default. After i changed it to Serial Wire it worked.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install stm32f103c8

            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/MagicPrince666/stm32f103c8.git

          • CLI

            gh repo clone MagicPrince666/stm32f103c8

          • sshUrl

            git@github.com:MagicPrince666/stm32f103c8.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