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
3 answers
25 views

Can I write a 8 bit or 16 bit Data to the outport of the STM32 directly

I am using STM32F103 ,CUBE IDE with HAL library , I am trying to write the outport as giving a 4 bit value to the entire port (16bit ) By using a shift bit operator . Can I directly apply that data to ...
Electrone's user avatar
-1 votes
0 answers
36 views

DC motor turning on and off when driving RC car

Here is a video with sound of what is happening: https://imgur.com/xh8cAyr I bought a cheap RC car off of Amazon and replaced the motor driver (kept the same motors) with my own TB6612FNG Dual Motor ...
MoeMan's user avatar
  • 1
2 votes
1 answer
32 views

Synchronous Sampling of ADC over SPI on STM32 (STM32G474)

I have a design incorporating an ADC with an SPI interface that requires: SPI Transfers of 32-bits to read the conversion results from the previous conversion. To be able to sample the ADC at 1 MSps ...
gordonC's user avatar
  • 21
1 vote
2 answers
37 views

Connecting to STM32 via SWD, Reverse Engineering

I have been reverse engineering my electric longboard remote for the past couple days and have been attempting to get a ST Link V2 connecting to it via some test pads on the PCB I found. I know the ...
Conner Replogle's user avatar
0 votes
1 answer
66 views

What does the frequency of a microcontroller mean?

I'm working with STM32 board which a microcontroller is embedded. This MCU seems to work within 72MHz max. Now if I make a C code, does that mean each simple instructions would be done within 72MHz? ...
Classy Fied's user avatar
0 votes
1 answer
45 views

What is expected error rate and drop rate on ST-Link VCP USART?

What is expected error rate and drop rate on ST-Link VCP USART? On the Nucleo STM32F446RE, my code reads the USART VCP (of ST-Link) and echoes it back. It uses DMA, FreeRTOS, and FreeRTOS queues (...
SRobertJames's user avatar
0 votes
1 answer
22 views

How to receive from UART via DMA on STM32F4?

Thanks to help from this site, my code can send and receive over the STM32F446RE Nucleo UART (using the Nucleo's built-in ST-Link / VCP). I'm now trying to move the receive to DMA, and seem to get a ...
SRobertJames's user avatar
0 votes
1 answer
47 views

How to debug a failing USART?

I have simple code which writes to the USART on a Nucleo board that is connected to ST-Link, and appears on my workstation via VCP over USB. I'm trying now to port it to a STM32H735G-DK Discovery but ...
SRobertJames's user avatar
1 vote
2 answers
35 views

How is the LCD on STM32H735G-DK connected, and how can I turn it off?

The STM32H735G-DK Discovery board comes with an LCD. I wrote from scratch (no HAL) a simple blinky code, and it works well. However, the LCD is on (and backlit) by default, without any code from me ...
SRobertJames's user avatar
0 votes
0 answers
30 views

Downloading data from memory using STM32 cube programmer fails with error "Data read failed"

I am connected with a STM32 cube programmer to a chip and essentially want to dump all the memory into a file (Windows 10, device STM32H7xx, MCU, 2MB flash size). I tried this command ...
Alex's user avatar
  • 151
0 votes
0 answers
35 views

How can I use normal CAN with CAN FD?

I'm working with i.MX6ULL not supporting CAN FD but other CAN nodes supports. How can I use normal CAN on this bus without making any hardware changes? I need to fix CAN to CAN FD communication ...
gilding's user avatar
0 votes
1 answer
71 views

USB host, STM32. f_mount returns FR_DISK_ERR

I'm trying to connect a USB flash drive to an STM32F407VGT6. IDE Keil, I used compilers 6.19 and 5.06. ...
stm's user avatar
  • 71
0 votes
1 answer
42 views

STM32F207VCT6 chip won't connect via USART to STM32CubeProgrammer

Recently I started a new personal project, where I'm trying to develop my own SMD-to-female-header PCB for the STM32F207VCT6 MCU chip. After ordering all the parts, doing some reflow soldering, ...
RodolfoGM's user avatar
0 votes
0 answers
20 views

BLDC motor is locking method to reduce the phase current

I'm using the BLDC motor rotating as a six-step commutation method. Now, I want to add the Anti-Theft method feature to lock the motor's rotation on both sides to change the wrong six-step commutation ...
Prathap P's user avatar
0 votes
1 answer
39 views

Confused about STM32 FMC pins for SDRAM

Context: I am currently working on a design that is centered around the STM32H723ZGEI6. I chose to opt for 32MB of external RAM via the IS42S16160J SDRAM IC. However, I am having some trouble figuring ...
BlueOyster's user avatar
1 vote
3 answers
190 views

Scoping the UART on a STM32 Nucleo

I have a Nucleo F446RE, which writes to UART which is handled by the built-in ST-Link over VCP on USB. I'd like to be able to see the serial signals on my oscilloscope as well. There are two exposed ...
SRobertJames's user avatar
0 votes
1 answer
45 views

Tim5 initialization unable to trigger callback function on stm32

I've been having a lot of trouble lately trying to get ADC3 to run on my STM32F746g-discovery board, so I started from scratch in order to try to pinpoint a problem. Unfortunately, now timer5 isn't ...
Eli Y's user avatar
  • 75
0 votes
1 answer
33 views

STM32 with CP2102N able to receive but unable to transmit

I have a PCB that I have designed which uses an STM32 and CP2102N. I am able to receive data sent from my computer to the board when I plug it into my computer, but I am unable to send data from the ...
Kyle Kingsberry's user avatar
0 votes
1 answer
72 views

STM32F407 Heating up, the decoupling capacitors showing short to ground with multimeter but microcontroller seems working fine

I have an stm32f407 which was running okay for like a month. but now i am seeing that whenever I connect power supply the current consumption is very high and the MCU is heating up a lot. The ...
Mir Hamza's user avatar
0 votes
0 answers
50 views

How to make new versions of Stm32CubeIDE (1.9+) to debug fake stm32 chips

So, I have an old installation of Stm32CubeIDE 1.6.1. And, a new installation of Stm32CubeIDE 1.13.1. And, a bunch of blue pills with CH32 chips from the chip shortage times. The 1.13.1 version does ...
sx107's user avatar
  • 1,075
0 votes
1 answer
30 views

STM32F103C8T6 BluePill - HAL_RTC_AlarmAEventCallback - Not call

I have a problem: I can’t get the alarm clock to work on the BluePill board. I need to get an interrupt to wake up the chip from Stop mode. It seems to me that the problem is in my BluePill board, ...
Vyacheslav Nizhegorodtsev's user avatar
0 votes
1 answer
24 views

STM32F030 I2C: Avoiding NACK

I am trying to port my I2C code from STM32F103 to STM32F030. Everything works fine with writes (writes to an eeprom), but when I try to read from an EEPROM (first write transmission with memory ...
sx107's user avatar
  • 1,075
2 votes
0 answers
57 views

USB-PD 3.1 (up to 240W) Dual-Role Port Controller

TLDR: do any dual-role USB-C port controller ICs support USB-PD 3.1 to allow 240W charging? I am designing a power management module for an ebike which will utilize bidirectional USB-C Power Delivery. ...
Chase Martin's user avatar
2 votes
1 answer
47 views

USB,HID. How to use 0x06, 0x00, 0xFF, //Vendor Defined Page 1?

What is "0x06, 0x00, 0xFF, // Usage Page = 0xFF00 (Vendor Defined Page 1)" used for? USB HID Report descriptor. ** In the USB documentation I only found this: Unknown Usage Unknown usages ...
stm's user avatar
  • 71
1 vote
0 answers
42 views

Stm32F746g ADC SCAN mode not printing any values through DMA

I have an STM32F746g-Disco board that I'm using to continuously read 4 ADC channels directly to the memory. I've tested the ADC on continuous conversion mode for each pin separately and it works, but ...
Eli Y's user avatar
  • 75
1 vote
1 answer
54 views

Computer interface with USB devices

I'm making a computer peripheral that will be connected via a USB. The main brain is an STM32 ARM MCU, it has USB support natively. It has multiple sub-peripherals inside and it uses I2C and SPI to ...
Abd Alhaleem Bakkor's user avatar
2 votes
1 answer
54 views

USB, HID. Correct "Usage Page (Button)" declaration

Why do I need 5 commands to declare a Usage Page (Button)? If these commands are not for the button, then what are they for? ...
stm's user avatar
  • 71
0 votes
1 answer
64 views

HID USB. How does the INPUT command work?

...
stm's user avatar
  • 71
0 votes
0 answers
26 views

BLDC motor don't rotate through the C code flashed nor ST Pilot Motor unless I manually rotate it first

I'm using the nucleo-f302r8 + x-nucleo-ihm08m1 + a BLDC motor. I'm trying to make the motor spin on the press of a push-button. I made a C code for it but unfortunately, my motor seems stuck when I ...
Classy Fied's user avatar
1 vote
1 answer
33 views

Can a pin be on a state diferent from the reset state if the chip is erased?

I am working with the STM32F030CC and noticed that PA2 strangely has an internal pull-up resistor enabled when the chip is erased. The reset state of that pin is high-impedance input, and when I press ...
Daniel Sprenger's user avatar
0 votes
1 answer
69 views

Peaks on absolute rotary encoder values graph

I have a rotary encoder AEAT-9922, which is connected using SSI2 mode. The read format is defined on the 16th page of the datasheet. Encoder is connected to the STM32F373 microcontroller, which runs ...
Andrii's user avatar
  • 103
0 votes
0 answers
36 views

STM32H750B-DK ADC sample rate calculation

I am making an oscilloscope. I am using ADC with configuration like this: And I am triggering my ADC with 1 ms (at least I think it is (was always confused on how to calculate its tick, so I just set ...
LaCalienta's user avatar
0 votes
1 answer
31 views

STM32F446 DMA to Peripheral Connections

I'm using a Nucleo-F446RE with CubeIDE and HAL. I can write code which uses TIMER1, DMA request TIM1_UP to use DMA2 Stream 5 for memory-peripheral (GPIOC) transfers. I set the up DMA using: ...
65Roadster's user avatar
  • 1,275
3 votes
3 answers
356 views

STM32, how to create microseconds long custom pulses

In steady state the line (output) is high and we have to create pulses that are microseconds long and are low. It is going to be a custom sequence with different pulse lengths (for example the line ...
dsplover123's user avatar
0 votes
0 answers
32 views

Is it possible on STM32 to detect if an event triggered?

According to Stm32 Event and interrupts , STM32 events are mainly for controlling other peripherals. Is there a way on the MCU itself to detect if an event fired? That is, I don't need to interrupt ...
SRobertJames's user avatar
1 vote
2 answers
62 views

HAL_TIM_PeriodElapsedCallback firing very prematurely

I am using STM32CubeIDE with an STM32G030 micro. I attempted to implement a simple interrupt-based timeout timer on Timer17 using the HAL driver. See attached file “Screenshot1”for the ...
Brian Dotson's user avatar
2 votes
1 answer
47 views

SPI - DOUT (MISO) and Data Ready (~RDY) pin shared

I am attempting to interface to an SPI measurement IC and read data from it. This makes use of a "data ready" feature, which lets the microcontroller know that a measurement is complete and ...
xulo's user avatar
  • 160
-1 votes
0 answers
37 views

Reducing power in idle loop

I'm controlling an ST32 ARM Cortex M4 via interrupts. While waiting for an interrupt, I spin in idle loop for(;;){}. Is there a way to tell the CPU "Don't ...
SRobertJames's user avatar
-1 votes
2 answers
110 views

What's a good way to learn microcontrollers without magic? [closed]

I know software (C, C++, POSIX, assembly) and would like to learn microcontrollers at a low level, down to digital circuits. I don't want to use any tools that obscure the internals, such as Arduino, ...
SRobertJames's user avatar
0 votes
1 answer
76 views

How should I debug this ARM Cortex M STM32 UART write?

I have a STM32F446RE on a Nucleo F446RE, and I'm trying to learn how to program the UART to write over the Virtual COM Port (connected to USART2). I'm able to download someone else's code, modify it ...
SRobertJames's user avatar
0 votes
0 answers
57 views

STM32 L4(Nucleo-144) CAN Tx pin stays high and dosen't transmit any data

I'm new to STM32 and a starting knowledge of C. I'm trying to get some level of CAN communication to be working. I've tried looking up the HAL'S required but for some reason no matter what I do, the ...
George kirby's user avatar
0 votes
1 answer
97 views

Why does my STM32 only run once when flashed?

I have a custom board with an embedded STM32L451RETx LQFP64. I can load a firmware using either a J-Link or a ST-Link probe and run it. My problem is that when I trigger a reset or shut down the power ...
Hector Silva-Diaz's user avatar
1 vote
1 answer
66 views

How do I use CMSIS without a GUI or IDE?

I have a bare metal STM32 C project working on a NUCLEO-F446RE. To learn about MCUs, I did not use any code generators or IDEs, but created a simple Makefile, linker script, start up C code, and <...
SRobertJames's user avatar
0 votes
0 answers
36 views

One connector pin connected to TX (or RX) and DP (or DM) of STM32 microcontroller

I have a project here that needs the STM32L432 to operate in two modes, UART and USB. It will be connected to another system via a 5 (or 4) pin connector. It operates mainly in UART mode with pins ...
уве вонг's user avatar
1 vote
1 answer
31 views

Disable peripheral interface via STM32 Memory Boot Mode remotely

Here's the current scenario: There's a remote STM32 MCU F746ZG that is prohibitively expensive to retrieve or access, and only has an I2C1 connection. The USART peripheral interface is causing issues (...
UberChio's user avatar
10 votes
3 answers
2k views

Why do STM32 MCUs divide RAM into SRAM1 and SRAM2?

Why do STM32 MCUs divide RAM into SRAM1 and SRAM2? They seem contiguous, so that I could simply configure my linker to treat both as just one chunk of RAM. Should I do that? If not, how do I tell the ...
SRobertJames's user avatar
2 votes
0 answers
29 views

Accuracy of PTZ with Permanent Magnet Synchronous Motor (PMSM) [closed]

For my project I need a pan-tilt system able to provide 0.1° resolution or better. I do have my own solution based on stepper motors with planetary gear for low backlash and 0.05°. However, I designed ...
D. K.'s user avatar
  • 131
0 votes
1 answer
25 views

STM32G431CBux and NXP TJA1051T/3/1J

Given is a STM32 G431 CBUx MCU and a TJA1051/3 CAN transciever. As I also need USB on this MCU, the only way to connect the CAN transceiver are pins PB8 (FDCAN1_Rx) and PB9 (FDCAN1_Tx). The problem ...
pm4812's user avatar
  • 67
0 votes
1 answer
31 views

How to program and download a file to STM32F746-disco board?

I'm trying to program my touchGFX project and download a music file to this board without much luck. The touchGFX project works fine but I'm testing the sound part now. I managed to extract the ...
Rodo's user avatar
  • 913
0 votes
0 answers
35 views

STM32 FreeRTOS UART failing to return from interrupt

MCU is an STM32L422 FreeRTOS (CMSIS-V2), 3 simple tasks, they run just fine on their own. USART1 is configured to receive data via IDLE detection and DMA circular buffer. Again it works fine on it's ...
Charles's user avatar
  • 137

1
2 3 4 5
69