Questions tagged [stm32]

The STM32 is the third ARM family by STMicroelectronics. It follows their earlier STR9 family based on the ARM9E core, and STR7 family based on the ARM7TDMI core. The STM32 is based on the ARM Cortex-M family of cores.

Filter by
Sorted by
Tagged with
0
votes
2answers
3k views

STLINK V2 disconnects in the STLink Utility

I have some strange behaviour of my STLINK V2 when I just plug it in the USB port and then open the STLINK Utility tool. When I then go to settings it finds the STLINK V2, but after about 5s the ...
0
votes
1answer
182 views

SPH0645 timing diagram

I am studying this SPH0645 module for use with a STM32. I started by checking the timing diagram of the I2S and compatibility between this module and the STM32. The STM32L151 MCU is compatible with ...
4
votes
1answer
643 views

Receiver issues on STM32H7 interrupt-based SPI

I want to configure a simple interrupt-based SPI slave transmitter/receiver on a STM32H7 MCU. Even though I have quite a bit experience with the older series of STM32 ARM MCUs, it seems that a lot of ...
0
votes
1answer
64 views

Accessing the STM32L412KB Serial Wire Debugger (SWD) Connections (Novice User) [closed]

I am attempting to program an STM32L412KB device using ST-Link/V2-1, a Raspberry Pi 3B+ and OpenOCD software. To do this however, I require access to the SWDIO connection and the SWDCLK connection of ...
-1
votes
1answer
372 views

Stm32F4-Discovery starting problem

I'm using CoIDE and the CMSIS library. The problem is that my programs start up normally only immediately after flashing the board. By disconnecting and reconnecting the board to the usb( just for ...
-7
votes
1answer
138 views

Protect my C source code [closed]

I want to give somebody a project, but i used my own libraries on that and i want to protect my code. I'm currently working with C in STM32 systems. What can i do?
0
votes
2answers
63 views

STM32F103rb datasheet mentions 4gb address space, while only 128kb flash and 20kb RAM?

I am trying to advance my way into the STM32F103RB, and I don't understand the address space mapping defined in chapter 3.2 in the the STM32F103RB datasheet. It states: Program memory, data memory,...
1
vote
1answer
24k views

STM32 HAL Implementing UART receive Interrupt

I have trouble in implementing the USART RX on a stm32f303k8t6 with the HAL libraries. What I actually want to achieve is, that I can send a variable length string over the uart bus and decode the ...
0
votes
1answer
67 views

How to program STM32_F4VE with ST-LINK/V2/01-0 [closed]

I am using keil uvision 5. I haveSTM32_F4VE development board and ST-LINK/V2/01-0. How to program this board with ST-Link v2? If you can suggest some website link also it would be helpful.
1
vote
1answer
914 views

STM32L4 Clocks Configuration

Does anyone know of a code template to properly configure clocks, PLL, latency, etc. for the STM32L4x parts? I'm using a NUCLEO board with this part (L476RG) and have struggled for days with the ...
0
votes
1answer
2k views

How to configure Multichannel ADC properly? Currently two different values stored in same variable

I want to use Multichannel ADC using the STM32F4 so I want to read two different AC signals on two different pins/channels. One AC signal value should be stored in ADCConvertedValue[0] and the other ...
1
vote
0answers
61 views

Write protection error on STM32F779II while erasing flash

I'm trying to erase flash for STM32F779II. The start up file starts with that section: ...
2
votes
1answer
1k views

What does TIM_OCMode do on STM32F4?

I'm making locked antiphase drive for motor control on STM32F4 board. Im configuring Timer4's 4 channels to be in pairs, ch2 inverse of ch1 and ch4 inverse of ch3. Each pair will control its own motor....
29
votes
5answers
37k views

CMSIS vs HAL vs Standard Peripherals Library

So I'm switching from PICs to ARM and I bought an STM32F4 discovery board. So far I understand that to program it you can either access all registers directly in memory (obvious way) and also there ...
0
votes
1answer
74 views

STM32 trying to communicate with 2 I2C. But second one fails

I am trying to communicate with a battery using SMBUS. Battery has 2 sections so it uses 2 separate SMBUS lines. I am trying to read SOC information from two section by using STM32F103C8. First ...
0
votes
1answer
3k views

Why will HAL_SPI_Receive() not read the L3GD20H gyro on my STM32F303 Discovery board?

I have an STM32F303 discovery board for which the mems gyro L3GD20H is connected to the SPI1 peripheral by default, that is the Sclk, MISO and MOSI are connected to pins PA5, PA6 and PA7 respectively. ...
0
votes
1answer
713 views

Selecting the correct ILI9341 Drive Mode for STM32F407 using FSMC

I have selected the STM32F405 for my next project. With this controller, I am planning to drive a 240x320-TFT with an ILI9341 display controller by using the STM32's internal FSMC interface. I have ...
1
vote
1answer
115 views

STM32 UART How to receive 9 bit?

I am trying to understand how I can setup the UART peripheral to receive 9 bit data blocks. I am using the ST IDE (STM32 cube IDE) and the Nucleo-F103RB board. I can setup the peripheral in 9bit mode ...
2
votes
1answer
168 views

STM32 HAL vs LL

I'm exploring the world of STM32 microcontrollers. I must say, so far it's a huge puzzle. I find that there are many documents provided by ST, but none of them really teach me anything. And it's ...
0
votes
0answers
39 views

STM32 UART receive ISR callback

I am using the STM32CubeIDE to setup the UART peripheral. I can check 'USART1 global interrupt' checkbox in the NVIC settings tab. But when I save and generate the source files, I can't find any ...
3
votes
3answers
13k views

High resolution system timer in STM32

I have some software running on an STM32F103 (I'd also like to be able to use the F4) where I'd like to be able to 'timestamp' events (such as interrupts on external pins) to the nearest microsecond (...
3
votes
3answers
4k views

STM32 print via UART without Nucleo/Discovery

I would like for debugging/trace purposes to print texts (preferably via printf but just text is also fine) from an STM32F103C8T6 to a (PC) terminal application. I noticed that all examples use a ...
0
votes
1answer
49 views

Adapt EEPROM EMULATOR STM32F103VE

I'm working with STM32F103VE and STM32F746, and i want to use my Flash memory as EEPROM EMULATOR for writing and reading data easily. I have searched for axemples of Emulation of EEPROM for my board ...
2
votes
1answer
409 views

TX Polling Not Working when setting RX interrupt stm32f103rc

I was trying USART on STM32F103RC,baud 115200, sysclk 72MHz, 1 stop bit, no parity and i connected my stm with usb to serial to look my output on terminal. At first i did polling of RX and TX and send ...
2
votes
3answers
68 views

STM32 product line in a spreadsheet?

There is a staggering number of variants of the STM32 family of MCUs. I have been led to believe that a list of the available STM32 microcontroller parts and their various features is available ...
0
votes
1answer
751 views

What is causing my error in executing arm-none-eabi-gcc.exe from Keil uVision?

I'm attempting to set up Keil uVision to build a simple C++ program for the STM32F3 microcontroller. I've downloaded the GNU ARM toolchain on my Windows computer and placed it into the directory ...
3
votes
1answer
2k views

STM32 UID decoding

In my project I need to make readable 96bit UID, in reference manual is described how the number is encoded: ...
0
votes
1answer
595 views

DS18S20 Temp sensor HAL Library

I am using stm32f303k8t6 nucleo board and Keil V5 IDE. I want to measure temperature with DS18S20 sensor over one wire interface. I have downloaded the HAL library from https://github.com/nimaltd/...
0
votes
1answer
2k views

generating different duty cycle on two different pins of same pwm timer STM32 Nucleo

I used STCube to generate my code in order to get a different duty cycle on two different pins of the same timer on my Nucleo F446ZE board. It works for the most part, both pins have the same ...
1
vote
0answers
65 views

Battery Monitoring IC communication via SPI

I am trying to use Max14921(Battery monitoring system) to measure voltages of 16 cells of a battery pack. I have used stm32f103c8t6 as mcu. The problem is that I could never communicate with IC. I ...
10
votes
3answers
6k views

What happens on the STM32 when two pins are configured to have the same alternate function?

Reading through the STM32F051 manual, it looks like it's possible to configure the same alternate function on two pins; for example, you could have multiple USART1_TX pins at the same time. Or for ...
1
vote
2answers
62 views

How can I run an STM32L with an unpowered ST-Link connected?

I have an STM32L476RG on a custom board that I have to leave connected to an external ST-Link/V2 so that I can reprogram it without accessing the hardware. I'm also forced to do this via a USB hub due ...
1
vote
0answers
77 views

STM32 I2C Fast Mode Issue

Currently, I am implementing I2C communication with Interrupt. STM32 serves as the slave and Arduino serves the master. MCU: STM32L152RDT6 For previous work, I2C communication in standard mode is ...
3
votes
5answers
901 views

STM32 cannot reach individual registers and pins as PIC

I used to work with PIC and now I need to use STM32 chip. I was using HAL library but it gave me some problems so now I want to use it without HAL_Library. There are some questions I could not get any ...
1
vote
1answer
1k views

stm32f0 uart1 rx interrupt

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 ...
0
votes
1answer
330 views

PG2 GPIO output on Nucleo-F767ZI doesn't function

I have made a board on which I plug the Nucleo-F767ZI microcontroller board. There is one GPIO pin that I cannot get to function as a digital output: PG2. This is ...
0
votes
0answers
29 views

CRC error from CMD8 during intialization process?

I am trying to initialize SD card for a project I managed to get reply for CMD0 with 0x01 but when i send CMD8 I get response of 0x09 which means CRC error however I am sending the correct value for ...
1
vote
3answers
80 views

triggered PWM from ADC end of conversion

I am making a full bridge control on D-SMPS and I want to trigger PWM from ADC to keep output voltage constantly stable. I am using STM32f103xx as microcontroller. The problem is that looks like in ST'...
0
votes
1answer
51 views

STM32 I2C transmitting no data and cannot change the data that is being transmitted

I am trying to establish a SMBus connection by using STM32 chip. When I try to transmit data to battery (0x0D) I see 0x0B with oscilloscope. When I change the data that is being transmitted to 0x00 or ...
1
vote
1answer
390 views

Stm32 C - Stepper motor start after 1 minute

I wrote a stepper motor driver with the use of DMA and TIM1. I accelerate the signal using the so-called Ramps. I calculate the times and load them into the DMA table and pass them to the TIM PERIOD ...
0
votes
1answer
77 views

PWM logic level issue

I am facing new problems everyday at embedded system. I have designed D-SMPS and put an stm32f103 to drive mosfets.I have tested micro controller and it works well while giving outputs as GPIO.It is ...
0
votes
1answer
1k views

STM32 FSMC/FMC and DS90CR285

I don't want to use an FPGA. I need to quickly put together a prototype that will relay DCMI data (small resolution camera sensor) to DS90CR285. Here performance doesn't matter that much – later it ...
9
votes
1answer
5k views

STM32F407 + LAN8720A + lwIP + FreeRTOS = No received Ethernet frames

I'm trying to bring up a PCB that uses an STM32F407 and LAN8720A Ethernet PHY, and I can't seem to receive any Ethernet frames — even though I have no problem transmitting frames. Hardware setup I ...
0
votes
0answers
32 views

Partially functioning code of stm32f407vg board to toggle leds using a push button as an external interrupt

I have written a simple code using CMSIS library functions of Stm32 to blink one built-in led during normal operation and another one when an external interrupt is generated by an interfaced push ...
1
vote
1answer
56 views

Strange STM32L476RG GPIO behaviour when leaving STOP mode 2. Is it a silicon bug?

Before I enter the stop mode 2 I save all the GPIO MODER, OSPEEDR and PUDPR registers, configure pins as analogue (to save some power) and enter the STOP mode 2. When I exit the stop mode (I use RTC ...
2
votes
3answers
893 views

Driving Nokia TFT LCD with STM32

How do I increase the refresh rate of a Nokia LCD that I'm driving using the STM32F103 microcontroller? The LCD is 132*162 and takes a 9-bit instruction/DATA with RGB for each pixel in 565 format. ...