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
1 vote
0 answers
43 views

Commutation BLDC Motor with Complementary PWM produces slower speeds than Independent PWM

'"a complementary PWM can be used, which will also reduce the power dissipation in the devices". That means using Complementary PWM makes the MOSFET cooler. However, in my program, using ...
user avatar
0 votes
0 answers
23 views

STM32H7 DMA not transferring correct values into TIM15 CCR1 register, why?

I feel like I am running out of options as to why this is occurring as the RM isn't that accurate to setup DMA + PWM using Timers. The goal is to use TIM15 as a PWM generator running @ 800kHz running ...
user avatar
  • 1,327
-3 votes
0 answers
57 views

Writing into flash memory [closed]

I am using STM32 HAL library for read and write flash. I have few questions: What will happen to data present in flash when we reset power? What will happen to data, if we flash new code with only ...
user avatar
  • 17
2 votes
1 answer
60 views

GPIO pins not changing state - unsure how to debug

I am using an STM32F072CB. Some of the GPIO pins are connected to a multiplexer for controlling the channel, and others are connected to some MOSFETs. The pins are configured as regular no push/no ...
user avatar
0 votes
2 answers
55 views

STM32F303 - is it possible to read the state of PB14 when in MISO SPI mode?

I have an ADC chip, CS5532, that sets the MISO line on PB14 Hi if data not available, and Lo if it is. Can I read the state of the MISO line? Every time I try to do it I read that the pin is Hi (I am ...
user avatar
  • 12.1k
0 votes
0 answers
22 views

STM32CubeIDE Importing a Project in C Language

I am trying to import a project written by C language into STM32CubeIDE. The files are arranged as follows: Acoustic recorder, acoustic transmitter and master_rf are separate projects (each should be ...
user avatar
3 votes
0 answers
32 views

Multiplexer bandwidth limit (Datasheet decryption) for two external clock on STM32

I would like to have the possibility to select between two main clock on my STM32. Both clock are single ended, 3V3 LVCMOS output. First clock is a 19.2 MHz TCXO, and second clock is a variable clock ...
user avatar
  • 466
0 votes
1 answer
41 views

STM32F407VET6 - How can I handle frame and noise errors in UART?

I'm receiving data in UART Rx with DMA and I need to make it immune to disconnections. Now, sometimes I can recover the communication after a disconnection, but I need to recover it always. Using the ...
user avatar
-1 votes
1 answer
37 views

MCU receive CAN data after a while

I am using stm32f4 and sensor with my Canbus experiments. When I transmit canbus data to sensor, sensor send to some data as in below picture( green is Canbus H line, pink is CAN-Rx line) And blue is,...
user avatar
  • 283
0 votes
0 answers
21 views

How to handle large MQTT data (240000 Bytes) on STM32

I am using STM32L475 dev board and SIM7600 4g module. I have implemented MQTT communication in this project. I can successfully connect to MQTT broker and also able to receive the data. But the ...
user avatar
0 votes
3 answers
59 views

Can Tx-Rx Data Line

I am trying to see some data on the CANBUS line , I show the CANH and CANL data on the osciloscope line. And detect Rx line, When I show the Transmit message on the CANBUS line, I show the this data ...
user avatar
  • 283
0 votes
0 answers
15 views

Canbus Rx pin shows Tx data [duplicate]

I am trying to see some data on the CANBUS line , I show the CANH and CANL data on the osciloscope line. And detect Rx line, When I show the Transmit message on the CANBUS line, I show the this data ...
user avatar
  • 283
0 votes
1 answer
35 views

Facing problem to download Hex file to STM32 using Command line

I managed to write a script for flashing hex file into STM microcontroller. ...
user avatar
  • 3
1 vote
1 answer
57 views

Schematic to work with an SD card

The application note AN10911 from NXP contains several schematics for working with SD cards, for example the schematic shown below. However, it also states: This schematic does not include details ...
user avatar
  • 139
1 vote
1 answer
48 views

QSPI/QuadSPI: alternate bytes purpose?

I'm getting familiar with QSPI on my STM32F746-Discovery (not really relevant for the question, just some context). While reading reference manual, it lays out in details how the peripheral functions (...
user avatar
  • 3,328
0 votes
0 answers
39 views

STM32 SPI transfer only working correctly with first transfer, is there a relationship between the correct numbers and received values?

I have a custom PCB that contains a stm32f411re and a stm32f446re with the f411 acting as SPI master and the f446 is the slave. At the moment I have some very simple code, with the slave waiting in a ...
user avatar
  • 571
0 votes
0 answers
14 views

STM32F103: TIMER1 (CH3) doesn't work / produces no PWM (using libopencm3)

I use a STM32F103C8T6 with libopencm3 and I'm trying to get timer 1 on channel 3 (PA10) working. The datasheet (pg. 31) lists as ...
user avatar
  • 157
0 votes
1 answer
36 views

ST-Link high speed interface to access data stream from PC

I'm receiving 32bit samples from an external ADC via SPI (DMA) on the STM32U5 (NUCLEO board with ST-Link v3-E) at a rate of 51200 samples/sec. I'm trying to use STM32CubeMonitor to access these ...
user avatar
  • 229
0 votes
0 answers
31 views

STM32 Nucleo f401RE 1.44 inch OLED ST7735

I try to drive ST7735 OLED display with nucleo board. I worked with a ready-made example I found on the internet, but I could not print anything to the screen. When I compile my code, I don't get any ...
user avatar
  • 1
0 votes
2 answers
106 views

Programming unlisted ST microcontroller

STM32F400CBT6 is not found in the list of ST microcontroller. I've bought it from LCSC. It's datasheet is found in LCSC only that is also in Chinese only. I am not able to program it using stlink. The ...
user avatar
  • 55
3 votes
0 answers
48 views

STM32 - phase angle control concept

I'm using a STM32 for PAC (phase-angle control) of a mains load (cos phi > 0.95) and I'm unsure how I should implement the firing of the pulses. My first try was to use two timers and a EXTI pin ...
user avatar
0 votes
0 answers
43 views

Getting wrong color when testing LTDC

I am testing the LTDC on a dev board. The strange thing is I am getting the wrong color at initialization. Below is the code for initialzation of LTDC. I get red when I try to fill with blue, and red ...
user avatar
1 vote
1 answer
54 views

How to check the functionality of all the pins on stm32?

What happened: I was carrying my stm32 f401re inside a bag, and there was a little droplets of water inside the bag, when I removed the bag the MCU was wet, I wiped it gently on my clothes before ...
user avatar
1 vote
1 answer
35 views

Some questions about crystal oscillators of an STM32 microcontroller board

I have the STM32F302R8 MCU board.l Its user manual is here. There are two crystal oscillators on the board. X3 is missing and X1 seems to be used for the small debugger microcontroller (circled in ...
user avatar
  • 1,503
0 votes
2 answers
86 views

Two separate PCBs and common ground for UART communication [closed]

I have two separate PCBs. Both are powered by separate batteries. I want to communicate these two PCBs with UART. In some schematics, only RX and TX are used, while in others connections are made with ...
user avatar
  • 317
0 votes
0 answers
41 views

STM32 signal level issues

I have some weird signal issues and I'm not sure if its my layout or if my chip (STM32F405) is just broken. I'm toggling a port every ~1ms, but my scope says it's only outputting 900mV. There is a ...
user avatar
  • 133
0 votes
1 answer
53 views

How to calculate a time difference between 2 external interrupts

I'm using the STM32CubeIDE, and I want to use the maximum frequency of the chip (100 MHz) to calculate the time between two GPIO external interrupts and then compare that time to a reference (...
user avatar
1 vote
2 answers
52 views

Can CANopen coexist with CAN2.0B on the same bus?

I am new to CAN protocol so I have questions about combinations of CAN-Bus nodes on same network: Is it possible to communicate with two different devices one having CAN in Automation (CiA) CANopen DS ...
user avatar
3 votes
1 answer
98 views

Confusion with variable update in microcontroller programming

I use an STM32 microcontroller board and to summarize the question, in the following code inside the if clause the variable called ...
user avatar
  • 3,420
0 votes
0 answers
32 views

Problem with TTP229-BSF capacitive touch sensor using STM32F429

I'm trying to use a 16-channel capacitive touch sensor named TTP229-BSF with a STM32F429ZE discovery board. My code doesn't work at all. Only the second key is detected and it returns 16 in the serial ...
user avatar
1 vote
1 answer
34 views

MPPT input current measurement

I am currently working on building an MPPT, in a synchronous buck configuration. The HW side is almost done, I am still figuring out the current measurement and doing some tests to see how current ...
user avatar
15 votes
1 answer
1k views

Why is the MCU clock out waveform sinusoidal and not square pulse

I got a new oscilloscope :) (proud amateur moment) I am trying to visualize the internal clock of a STM32G431RBT6 MCU. So I built an example program given by the vendor which provides the MCU clock ...
user avatar
  • 151
1 vote
0 answers
36 views

SWD over USB C connector

I'm working on a CAN bus controller with a STMF105 MCU. The controller is in a waterproof enclosure with a sealed USB-C connector. I want the option to properly debug with SWD and easy field update ...
user avatar
1 vote
1 answer
35 views

STM32 Nucleo board, "crosstalk" between switch buttons

There are 3 switch buttons on a regular solderless breadboard each following this diagram: Upon pressing any of the buttons, I am getting spurious breakpoint hits inside the ISRs for the other two as ...
user avatar
  • 807
0 votes
0 answers
41 views

STM32 I2C BNO055 has big spikes in data in fused mode

I am reading euler angles in fused mode from BNO055 device. It gets correct angles, but there are big spikes from time to time, but only when the values are changing. I am sending data over USB to my ...
user avatar
0 votes
0 answers
75 views

Why does I2C only run once in interrupt mode on STM32?

I've got a custom board with two stm32f4s (f411 and f446) that communicate via I2C. Now, I have two dummy programs, where f446 is configured as I2C slave and f411 is I2C master. If I just transmit ...
user avatar
  • 571
0 votes
0 answers
28 views

What is the purpose of LIN broadcast 0x7F NAD?

This is something that is not clear to me from the LIN 2.2A spec which is publicly available. Consider a network with one LIN master and three LIN slaves, and a schedule table with a slot for master ...
user avatar
  • 101
1 vote
1 answer
75 views

STM32: USART interrupt triggered with no flags

I am using USART1 on STM32L051 with interrupts for serial communication. I start my program by sending 5 bytes from MCU to PC, which works fine, but then a USART interrupt gets triggered with only TXE ...
user avatar
0 votes
0 answers
32 views

How to change the PWM Mode in STM32F407 during runtime?

I have set Timer 8 to PWM Generation CH2 CH2N. Based on the value read by the ADC, I want to change the polarity of both CH2 and CH2N. I have found that using ...
user avatar
1 vote
4 answers
86 views

Reading ADC value on a button press

I have a keypad matrix that outputs the voltage level based on the button pressed. Normally, it outputs a maximum voltage (3.3V) and at the press of the button, it outputs the corresponding voltage ...
user avatar
  • 317
0 votes
1 answer
41 views

Voltage regulator consume more current

I have used LP3961 3.3V regulator cicuit for my STM32 microcontroller circuit. I have implemented low power stop mode in STM32. Micro controller consumed 25uA itself. When I Measured the current ...
user avatar
0 votes
0 answers
33 views

Obtaining instantaneous logic level of a PWM signal on STM32

I'm trying to figure out which of two PWM signals that are switching simultaneously is "1" at a given moment. Is there any way to obtain this information?
user avatar
0 votes
1 answer
68 views

Using a FDCAN controller with a CAN transciever on the STM32 platform (G431KB)

I have a source of can messages connected to the SN65HVD232D CAN controller, which is then wired to a NUCLEO-G431KB via the FDCAN1 TX and RX pins. I confirmed with an oscilloscope/digital decoder that ...
user avatar
1 vote
1 answer
40 views

i2c oled display problem with STM32F401RE Nucleo Board

I have an i2c oled display with an SSD1306 driver. I want to drive this display with my nucleo card. Pin configurations are shown below. I provided the i2c connection on the display via i2c1 on the ...
user avatar
1 vote
1 answer
32 views

Ebyte E32 RF Module Configuration Problem

I designed a PCB with STM32G474RET6. I used Ebyte E32-433T30S module. I search on web and read datasheet. So, I got some info; This Ebyte module need to be configuration before transmitting/receiving....
user avatar
  • 89
1 vote
0 answers
58 views

GPIO basically not working on STM32401CCU6 Blackpill

As a newbie I switched from Nucleo to Blackpill recently (STM32401CCU6 ) and after an overally good start I faced a wall. It seems like GPIOs are... dead for some reason: HAL_GPIO_WritePin/TogglePin ...
user avatar
  • 115
1 vote
0 answers
32 views

Interfacing to MEMS microphone with PDM output: what is causing this DC bias?

I have a MEMS microphone (IM72D128V01, using this eval kit) with PDM output connected to a STM32U5 NUCLEO board. (Background: it's connected to the ADF/Audo Digital Filter peripheral which I have ...
user avatar
  • 229
0 votes
0 answers
16 views

EEPROM Emulation utility fails during "PageTransfer" function (XCUBE-EEPROM V3.0.0 and 4.0.0) on STM32G474 MCU

I have incorporated the EEPROM emulation utility in a project based on STM32G474CE MCU. So far the read/write functionality works fine. The problem comes when a page is full and the pag transfer ...
user avatar
1 vote
0 answers
37 views

STM32L073 I2C not sending 9th clock pulse

I have an STM32L073 communicating with an IS31FL3246 LED driver over I2C. Occasionally the MCU will not send the 9th clock pulse and therefore locks the bus. (As shown in the picture the analog ...
user avatar
  • 51
3 votes
1 answer
172 views

Difference between open drain and push-pull modes

The figures show diagrams of line signals: the first in the open-drain + pull up mode, the second push-pull + pull-down. There are several questions: Why does a push pull output have a faster slope ...
user avatar
  • 43

1
2 3 4 5
77