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
1answer
25 views

STM32G030 BOOT0 pin - SWCLK

I designed a board with an STM32G030C8T6 MCU and some peripherals. The board is working just fine, regarding the functionalities, but I have some issues with flashing. So, the first "strange"...
1
vote
1answer
34 views

Boot selector bit on STM32g030

I would like to program the STM32G030. On page 14 of the datasheet it says: so there is a Boot pin and Boot selector bit. The Boot pin is pin 36 in the LQFP48 package I am using. I cannot however ...
1
vote
1answer
36 views

How to connect JTAG to microcontroller

I am using the STM32G030C8 and want to use a 6 pin JTAG Needle to program the microcontroller. In the datasheet for the microcontroller, on page 14 it says: So I need to connect whatever is ...
2
votes
3answers
439 views

Stand alone CAN bus module or STM32 embedded CAN?

I have spent days studying and trying to achieve simple communications with CAN bus from scratch using stm32f1, but I still have not achieved the desired results and it is difficult to understand and ...
1
vote
1answer
37 views

Programming the STM32F446RE with a CH340G module

I would like to know if it is possible to program an STM32F446RE MCU with a CH340G converter. And if it is possible, then how?
-1
votes
1answer
36 views

How to repeat a task every X ms on STM32F303VCT6 (C++) using timers/interrupts?

My aim is to do the following: 1- Repeat a task every 250ms and when the button is pressed the task is repeated every 500ms, and if the button is pressed again go back to every 250ms. 2- I plan on ...
0
votes
1answer
56 views

UART printing gibberish to the terminal when the STLink Debugger is not connected

Custom board, not an ST development board. MCU: STM32G031J6M6 SO8 package. UART RX/TX are Pins 1 and 8 respectively. Pin 8 is also SWDCLK Pin 7 is SWDIO and not used except for SWD NRST is Pin 4 and ...
1
vote
1answer
21 views

STM32 PDR_ON Pin Internal Power Supervisor Explanation

I want to implement STM32F746NG on my PCB - the one from the STM32F746-DISCO with display and SDRAM, Flash and other peripherals. The MCU has a PDR_ON pin, which I have never met before. I searched ...
2
votes
1answer
74 views

STM32 ADC & DMA causing infinite loop at startup

I am working with a nucleo-F401RE - I am experimenting with the DMA and ADC. When I try to debug my code it is immediately going into Infinite_Loop here is my code: main.c ...
1
vote
0answers
50 views

How to read from the TSYS03 temperature sensor?

I am using the STM32 Nucleo L432CK and want to read from the thermo 20 clickboard (MIKROE-4316) which uses the TSYS03 temperature sensor, but I do not get anything. Would appreciate if someone could ...
1
vote
0answers
67 views

When I move same commands into function program stops and while loop not working in STM32F0

I am developing library of LCD1602 for STM3232F030, I have header file like this: LCD1602A.h ...
2
votes
2answers
36 views

STM32F103C6T6 in dual simultaneous regular mode with DMA, ADC2 seems not to be triggered

It is my first time to use a Bluepill with STM32F103 processor (so far used custom board with STM32L4+). I want to setup dual mode so I can read 4 channels, 2 at a time simultaneously. I do not need ...
1
vote
1answer
48 views

STM32 matrix keyboard scanning gets random keypresses

I am trying to implement a keyboard with STM32 controller (since I managed to burn all my ATMegas and STM32 was all I have). It uses two matrices of keys (it was supposed to be a split keyboard, but ...
1
vote
1answer
46 views

How to measure the time it takes to receive a new sample from CODEC using a fixed sample rate of 48kHz?

in my current set up I have a CODEC set as master connected to my STM32F446RE (slave). The current configuration utilizes I2S DMA interrupt callbacks to handle the input and processing of these ...
0
votes
1answer
47 views

Has anyone seen how to use mt9v022/mt9v034 cams with microcontrollers? [closed]

I'd like to use Arducam's MT9V022/34 cameras for my project. However, the API they provide is quite limited, and also makes me buy their USB shield module(s). Important part of my project is to change ...
2
votes
1answer
89 views

Custom STM32H7 board + LAN8742 ethernet problem

I develop custom board with STM32H743VIT6 with ethernet LAN7842. When I plug ethernet, leds are not blinking. Is it hardware problem? When I plug eth to erased NucleoH7 board leds always blink. My ...
0
votes
1answer
53 views

Why SDRAM1 and SDRAM2 have the same pins on STM32

can someone please help me, why do when i use SDRAM1 and then add SDRAM2 the data and address pins are the same but only the chip enalbe. does this mean that all pins even the Data pins DQ can be ...
2
votes
1answer
64 views

Mass storage for timing critical applications

I am working on a data logger that requires measurements to be taken during narrow time windows. I have been storing the measurement data on SD cards, however, the write times are very inconsistent, ...
1
vote
1answer
96 views

Error rate calculation in UART

I am analyzing the error rate in UART communication. Can anyone tell me how to measure the bit error rate in UART communication? Is this possible to measure the error rate by Pico-Scope or by using ...
2
votes
1answer
52 views

HardFault and BFAR

I am using stm32f4. I have a hardfault error at sometimes, when I write new code in to the flash. So I check the Fault Registers like in below: ...
1
vote
2answers
73 views

Strange behavior of auto retransmission on STM32 CAN bus

I have two STM32L4Q5 controllers communicating over 500kBit/s CAN bus. The test application generates messages with variable length and data. The data checksum is used as low byte of message ID, while ...
1
vote
0answers
38 views

How do I communicate with the Wifi module on an stm32mp157f-dk2 board in bare metal?

I'm trying to establish communication with the WiFi module on an stm32mp157f-dk2 board. I must be doing something wrong because I always get a timeout from SDMMC2. I attempt to send 2 commands, the ...
8
votes
2answers
3k views

Two LEDs connected in series don't work

I'm very new to electrical engineering and I ran into a strange issue while trying to connect two LEDs in series today. Both my blue and white LEDs work separately, but when I try to connect them ...
2
votes
0answers
31 views

STDC14 connector pinout for ST-Link V3 for SWD debugging

I have a quick question: In the ST-Link V3 datasheet the pinout of the STDC14 connector is mentioned as follows: I have a question regarding: Pin 3: Should I connect the 3.3V signal from the target ...
2
votes
1answer
49 views

Correct wiring of crystal oscillator with MCU?

Actually this is a basic question I can't answer myself to be honest. I am using a MCU which requires a HSE: Now, this is for a crystal, but how do I connect a crystal oscillator with the MCU? The ...
2
votes
1answer
63 views

Roll out software update to multiple STM32s from a TCP/IP connection to PC

This is more of an "is this possible" kind of question, I'm not looking for a detailed step by step, more of a go ahead before I pull the trigger on all of the parts. I am in the design ...
1
vote
1answer
52 views

STM32F407VG Discovery Board, on board ST Link not recognized, but the pc recognized J Link is connected [closed]

So I have a STM32F407VG Discovery Board, the board has ST Link. But when I connect the usb to my pc, the ide that I used does not recognized it. I used atollic and stm32cube ide. But when I check my ...
1
vote
0answers
30 views

Can't clear HD44780 LCD screen with my own code using STM32F401RE

I have used this library to write something on my LCD screen. When I try to clear it with my own code, it doesn't work for some reason. Clearing text with library works fine. I'm using screen on 8-bit ...
3
votes
1answer
36 views

STM32F446RE PLL Config: What are the benefits and drawbacks of using different PLLCFGR register settings to achieve the same PLL output frequency?

Background I am learning how to configure the System Clock, and I am seeking help in understanding the benefits and drawbacks of various combinations of settings for PLLM, PLLN, and PLLP in the ...
0
votes
1answer
44 views

STM32 ADC Input Voltage Range

I'm using the ADC on pin 14, PA2, on the LQFP64 STM32G474CB (datasheet). What is the ADC input range for this pin? Here is my assessment let me know if my understanding is incorrect: Table 12. Pin ...
5
votes
5answers
926 views

What is the input and output current of the GPIO pins of a microcontroller?

I am trying to find the current sunk and sourced by the GPIO pins of the STM32G030 (STM32G030x6/x8). It says on page 40 of the datasheet: The output current sunk by any I/O and control pin When it ...
1
vote
0answers
39 views

Can I use the ST-LINK for programming and debugging STR7 Chips?

Is it possible to use the ST-LINK V3 to program and debug STR7 Familiy chips? If not, what programmer can I use?
2
votes
0answers
61 views

What is the correct speed for serial communication?

I am working with an STM32, more specifically a Nucleo-L476RG development board. I used the I2C ports to build a small virtual com port to broadcast some messages back to my computer. The code on the ...
1
vote
0answers
41 views

Why is this LSM303d register address being used with an OR and an address operator?

I'm trying to get the data of a LSM303d accelerometer using anSTM32 via the I2C bus. I've found online that to get the data from the OUT_X_L_A register (low byte of x component of the accelerometer) ...
1
vote
0answers
52 views

STM32L072 ADC slow conversion

I am trying to use the ADC on my board that runs at 32 MHz. I want to sample, using DMA, a signal each 2.5 microseconds (400 kHz) but is seems not feasible. The ADC seems to be running at 16 MHz so in ...
1
vote
0answers
44 views

Nucleo-STM32F401RE + ST-Link problem - cannot connect to the target

I have a problem with the connection. Yesterday my board stopped working (there is a file FAIL.txt: "The interface firmware FAILED to reset/halt the target MC" at board disk). I've done some ...
3
votes
1answer
105 views

STM32: How do you program it via USB?

Until now I was always using Arduino Nano Boards, which had the proper bootloader installed so that programming via the ArduinoIDE was easy and fast. Just plug it in via USB, wait for Windows to ...
1
vote
0answers
73 views

How to program interrupts with standard peripheral libraries on stm32f103vet6?

I tried to program an interrupt with S2 that is connected to PB1 on my stm32f103vet6 board, but I failed and I don't know why! The codes here: ...
1
vote
1answer
67 views

How to use GPIO on STM32 (F103VET6) as a kind of of output battery?

After I learnt how to blink LEDs on the board, I came up with the idea of making a LED matrix. The schematic is like this: But I could not figure out how to light it! Every LED can be lighted under 2....
1
vote
0answers
39 views

Triggering 3ADC's simultaneously in continuous mode by a timer in STM32

I have 3 ADCs (ADC1, ADC2, ADC3) configured with 3 different channels for 3 gpio pins to collect the data and all 3 ADC's are triggered simultaneously by TIM1 at the rising edge of the pulse. It is ...
0
votes
0answers
38 views

Why is the buffer continue to be filled even when the CODEC is not receiving an input?

I am currently using the HAL function HAL_I2S_Receive(I2S_HandleTypeDef * hi2s, uint16_t * pData, uint16_t Size, uint32_t Timeout) in order to collect an input ...
0
votes
0answers
30 views

I can't get ADC Value and in ADC Conversion mode i can only get 1 data (MCP3561/2/4)

Im using STM32H7 microcontroller. I can write to the register but they are not correct. I send IRQ register to 0x06 but i read 0x76. I connect AVDD and DVDD to 3.3V but IRQ connected to 1.8V(Design ...
-1
votes
1answer
130 views

STM32 ST-Link Unitily does not have the latest firmware

I am trying to update my ST-Link V2 to the latest firmware, since STM32CubeIDE wont upload code if I don't. STM32CubeIDE wants V2J38S7: But it always fails to update: "Upgrade successful" ...
1
vote
0answers
26 views

Interfacing PCM3060 Audio Codec With STM32

I am using a STM32F4 MCU, currently prototyping on a Nucleo-F446RE. I have a PCM3060 audio CODEC to do the analog to digital conversion. I am attempting to use the I2S protocol in order to interface ...
1
vote
0answers
69 views

STM32 Using SWCLK and USART on the same PCB

I designed a custom PCB which uses STM32F030C8 chip. I was wondering if it's possible to use debugging capabilities as well as UART communication on the same pin (PA14). It's not possible to attach ...
0
votes
1answer
82 views

STM32 timer output compare interrupt all interrupt flags set at once

I'm trying to set up the output compare channels of TIM3 of an STM32F103RB MCU. For now I only enabled channel 1, but later I'll need CH2 and CH3 as well. When CH1 triggers, the TIM3->SR register ...
1
vote
1answer
138 views

STM32F722 SPI Data from ICM-20948

I am trying to write a driver for the ICM-20948 9 axis sensor by Invensense on my F722 nucleo board. The first thing I am trying to do is see if I can read the device ID (0xEA for the 20948). However, ...
0
votes
1answer
68 views

Interfacing with a C64 SID Chip (clone)

I bought a MOS 6582 clone and want to control it with a STM32 Nucleo. Basically make a simple MIDI controlled synth. The hookup looks simple, but have a control question. Here's the detail on the ...
1
vote
1answer
78 views

Why does my ADC -> TIM -> DMA driver work for a bit, then freeze up, then continue working again?

This is difficult to describe, but basically my DMA ADC stream will give me correct readings for lets say 10 seconds, then gets "locked up" / outputs static values that do not change (when ...
1
vote
1answer
67 views

what is the best design choice for making an ACCURATE solar battery monitoring system?

I plan on making a high accuracy solar battery monitoring system where I keep track of the voltage of two 12 V batteries in series (using voltage dividers) and the load current in order to determine ...

1
2 3 4 5
72