stm32 | Swift packages related to the STM32 boards

 by   swift-embedded C Version: Current License: No License

kandi X-RAY | stm32 Summary

kandi X-RAY | stm32 Summary

stm32 is a C library. stm32 has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Swift packages related to the STM32 boards
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

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

            kandi-Quality Quality

              stm32 has no bugs reported.

            kandi-Security Security

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

            kandi-License License

              stm32 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

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

            stm32 Key Features

            No Key Features are available at this moment for stm32.

            stm32 Examples and Code Snippets

            No Code Snippets are available at this moment for stm32.

            Community Discussions

            QUESTION

            Log an array of bytes without fragmenting heap
            Asked 2021-Jun-15 at 19:36

            I am running some code on a STM32 chip which is logging to my uart port.

            I am having a hard time finding the proper way to log an array of bytes. I wrote this function:

            ...

            ANSWER

            Answered 2021-Jun-15 at 19:36

            If the problem did end up being from heap overuse (from strncat), then you could try out this implementation that uses the return from sprintf to append to the string as your building it.

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

            QUESTION

            Problem with FULLY_CONNECTED op in TF Lite
            Asked 2021-Jun-15 at 13:22

            I'd like to run a simple neural network model which uses Keras on a Rasperry microcontroller. I get a problem when I use a layer. The code is defined like this:

            ...

            ANSWER

            Answered 2021-May-25 at 01:08

            I had the same problem, man. I want to transplant tflite to the development board of CEVA. There is no problem in compiling. In the process of running, there is also an error in AddBuiltin(full_connect). At present, the only possible situation I guess is that some devices can not support tflite.

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

            QUESTION

            Openocd GDB server configuration
            Asked 2021-Jun-14 at 14:29

            I am using Openocd to debug my code remotely for STM32 via Raspberry pi as detailed in this tutorial: https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi

            Whenever I run openocd it starts gdb server on port 3333 which is default of course as shown in the picture above. My question is that, is there a way to provide a different port number for openocd to start the gdb-debugger on... For example, if I want to run openocd where i want gdb server to start on 3334 instead of 3333 how can i do that.

            I intend to do that so that i can run multiple openocd instances for different targets simultaneously connected to a single raspberry pi. Any help will be greatly appreciated. Thanks in advance.

            ...

            ANSWER

            Answered 2021-Jun-14 at 14:29

            OpenOcd manual explains how to select a specific port number inside the configuration file as shown in image below:

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

            QUESTION

            STM32 SPI communication with HAL
            Asked 2021-Jun-11 at 11:58

            I just started programming a STM32 and generated a code with CubeMX for an SPI communcation with a gyroscope (L3GD20) I have a problem with the HAL_SPI commands.

            I first try to read the WHO_AM_I register which return a good response (0xD4) Then I tried to do the same with CTRL_REG1 register and it was still good by returning (0x07).

            But if I try to get both of them one after the other, the HAL_SPI_Receive keeps sending the data of the first HAL_SPI_Transmit of the code... Tried to give it other buffers but still didn't work.

            Here is the part of the code I'm intersted in :

            ...

            ANSWER

            Answered 2021-Jun-11 at 10:26

            Since HAL_SPI_Receive is already using HAL_SPI_TransmitReceive (github stm32f4 spi driver) to send dummy data to generate clock, you can use that fact and ditch the HAL_SPI_Transmit, and use the receive function like this:

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

            QUESTION

            Adding a RAM section in linker file STM32
            Asked 2021-Jun-06 at 16:30

            I am trying very hard to understand how to use a linker file, but my brain is apparently not getting it at all. I am using an STM32L476, which has two RAM regions, RAM and RAM2 (memory definition below). I would like to put a buffer into RAM2, but there is no section for RAM2 in the default linker script that is generated by Cube. Seems like a good exercise for me. I really thought that the following would do the trick, where all I've added is the .sensor_buffer section:

            ...

            ANSWER

            Answered 2021-Jun-06 at 16:30

            You have an error somewhere else. Maybe you simply do not use this linker script (you forgot to add or change the name in the command line)

            I have compiled it and linked it without any problems with CubeIDE (I use 100 and 100 in the buffer declarations as I do not know the values of your macros [100x100 = 0x2710])

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

            QUESTION

            Connecting the STM32 blue pill to the serial monitor of the Arduino IDE (macOS)
            Asked 2021-May-30 at 15:25

            I am using the Arduino IDE to program a STM32 blue pill using a St-link v2. To configure everithing I follwed few guides like this one and eventually I could get a successful upload and get the blinking pin c13 example running.

            My problem is that enven I am able to compile and upload, the Arduino IDE does not detect any port, so I cant use the Serial Monitor as it shows

            Not conected. Select a board and a port to connect automatically.

            And indeed, the IDE does not recognise a port for any configuration...

            but it does show the stlinkv2 in the macOS system report

            Does anybody know what Im missing here? Theres maybe other alternative to see code-promts?

            ...

            ANSWER

            Answered 2021-May-30 at 15:25

            The ST-LINK probe you have doesn't provide a virtual serial port functionality. It's a debugger/programmer using the SWD protocol.

            I'm not familiar with using STM32 with Arduino framework, but in order to use Serial class of the Arduino framework, you probably need to access one of the hardware serial ports of STM32F103.

            In this case, you need an external USB - Serial converter which works with 3.3 volts logic levels and connect it to the relevant serial port pins of your Blue Pill board.

            Some ST-LINK models also provide embedded USB - Serial converter interface along with the SWD functionality. But even if you have one of those, you still need to physically connect ST-LINK serial pins into the Blue Pill serial pins.

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

            QUESTION

            Freertos and the necessity of uart transmit interrupt
            Asked 2021-May-24 at 09:59

            For uart reception, it's pretty obvious to me what can go wrong in case of 'blocking receive' over uart. Even in freertos with a dedicated task to read from uart, context / task switching could result in missing bytes that were received in the uart peripheral.

            But for transmission I am not really sure if there is a need for interrupt based approach. I transmit from a task, and in my design it's no problem if that task is blocked for a short while. (it also blocks/sleeps on mutexes e.g).

            Is there another strong argument to use use uart transmit in interrupt mode? I am not risking anything wrt loss of data, right?

            In my case I use an stm32, but I guess the type of mcu is not really relevant here.

            ...

            ANSWER

            Answered 2021-May-24 at 09:59

            Let's focus on TX only and assume that we don't use interrupts and handle all the transmission with the tools provided by the RTOS.

            µC UART hardware generally have a transmit shift register (TSR) and some kind of data register (DR). The software loads the DR, and if the TSR is empty, DR is instantly transferred into TSR and TX begins. The software is free to load another byte into DR, and the hardware loads the new byte from DR to TSR whenever the TX (shift-out) of the previous byte finishes. Hardware provides status bits for querying the status of DR & TSR. This way, the software can using polling method and still achieve continuous transmission with no gaps between the bytes.

            I'm not sure if the hardware configuration I described above holds for every µC. I have experience with 8 & 16-bit PICs and STM32 F0, F1, F4 series. They are all similar. UART hardware doesn't provide additional hardware buffers.

            Now, back to RTOS... Obviously, your TX task needs to be polling UART status bits. If we assume that UART baud rate is 115200 (which is a common value), you waste ~90 µs of polling for each byte. The general rule of RTOS is that if you are waiting for something to happen, your task needs to be blocked so other tasks can run. But block on what? What will tell you when to unblock? For this you need interrupts. Your task blocks on task notification, (ulTaskNotifyTake()), and the interrupt gives the notification using xTaskNotifyGive().

            So, I can't imagine any other way without using interrupts. But, the method mentioned above isn't good either. It makes no sense to block - unblock with each byte.

            There are 2 possible solutions:

            1. Move TX handling completely to interrupt handler (ISR), and notify the task when TX is completed.
            2. Use DMA instead! Almost all modern 32-bit µCs have DMA support. DMA generates a single interrupt when the TX is completed. You can notify the task from the DMA transfer complete interrupt.

            On this answer I've focused on TX, but using DMA is the proper way of handling reception (RX) too.

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

            QUESTION

            I cannot access STM32 DMA register when configuring it
            Asked 2021-May-24 at 06:35

            I currently use standard peripheral library to write a driver that enable memory to USART6_TX DMA transfer on a STM32 F407 ZGT6 chip. However, I tried for a long time but the initialization keeps on failing: DMA_GetCmdStatus always returns DISABLE. By using GDB, I found that after the DMA_Init try to write configuration into DMA register, DMA CR register remains 0. The DMA initialize code and execution are as follow:

            ...

            ANSWER

            Answered 2021-May-20 at 19:50

            When the desired stream is activated, the relevant registers can no longer be configured. Only in dual buffer mode can memory addresses 0 and 1 be updated according to the bit CT function. You must first deactivate the relevant channel and then apply the changes.

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

            QUESTION

            Read data from USB Virtual COM in STM32 Nucleo-F767ZI [Ubuntu]
            Asked 2021-May-21 at 15:03

            I have written a program to stream data through USB port CN13, using this video. I am not able to see the data on the USB Virtual COM Port. When I connect the ST-LINK and Virtual COM port, there is only one USB Device, ST-LINK, getting recognized when trying dmesg | grep usb. I have seen many basic examples on YouTube which shows the Virtual COM USB Port detection happens without installing any drivers. STM32 MOOCs uses Windows but I have Ubuntu 20.04 installed. I have tried some of the stack overflow solutions. Could anyone guide me as to how to overcome this issue?

            ...

            ANSWER

            Answered 2021-May-21 at 15:03

            I have found a way to use the USB port for communication. This is done using STM32CubeIDE

            1. Launch STMCubeIDE software.
            2. Select the USB_OTG_FS and set as device only mode.
            3. Then in middleware tab select the Class for FS IP as Communication device class(virtual com port).
            4. Set the clock frequency for USB as 48MHz.
            5. Generate the project.
            6. Read the usbd_cdc_if.c file
            7. Include the usbd_cdc_if.h in the main and send some data using CDC_Transmit_FS
            8. In Ubuntu, open a terminal and search for two ACM ports using ls /dev/tty, ACM0 and ACM1/ACM2 (which are STLINK-V3 and Virtual ComPort)
            9. Test using serial terminal (like Serial Monitor of Arduino IDE).

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

            QUESTION

            Minimize integer round-off error in PLL frequency calculation
            Asked 2021-May-19 at 21:46

            On a particular STM32 microcontroller, the system clock is driven by a PLL whose frequency F is given by the following formula:

            ...

            ANSWER

            Answered 2021-May-19 at 15:16

            I took your program (your first parentheses is redundant, so I removed):

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install stm32

            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/swift-embedded/stm32.git

          • CLI

            gh repo clone swift-embedded/stm32

          • sshUrl

            git@github.com:swift-embedded/stm32.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

            Consider Popular C Libraries

            linux

            by torvalds

            scrcpy

            by Genymobile

            netdata

            by netdata

            redis

            by redis

            git

            by git

            Try Top Libraries by swift-embedded

            swift-embedded

            by swift-embeddedSwift

            cross

            by swift-embeddedSwift

            epd

            by swift-embeddedSwift

            unicode-support

            by swift-embeddedC

            hardware

            by swift-embeddedSwift