All Questions
970 questions with no upvoted or accepted answers
26
votes
0
answers
3k
views
Switch from JTAG to SWD with bitbang sequence on STM32F103VB
I am trying to switch from JTAG to SWD without any external devices. Why? Because I would like to use the SWO pin to send a stream of logging information to
another device.
To accomplish this ...
8
votes
0
answers
2k
views
Is JTAG faster than SWD for debugging on an STM32F with STLINK-V3SET programmer?
There is a new STLINK-V3SET programmer that someone dropped off on my desk today. It supports USB 2.0. My thinking is that if SWD is the bandwidth limiter in the signal chain then a new programmer isn'...
6
votes
1
answer
6k
views
Run IAR Program without Debugging
I'm having a simple problem with IAR Embedded Workbench, programming an STM32 using an ST-LINK/V2 programmer. I'm trying to run a program that temporarily switches off the JTAG pins, so I can't run it ...
5
votes
0
answers
2k
views
STM32 - I²C Slave HAL Callback ACK
Objective: implement a single byte I²C slave on STM32.
Materials: STM32L452RE Nucleo-64 board, HAL Library, CH341 USB-I²C adapter(1), Artix Linux with Runit, Rhode & Schwarz RTB2004 oscilloscope
...
4
votes
0
answers
141
views
The MOSFET of H-bridge Inverter always explode
I met some difficulties these days.
I use 4 MOSFETs to put on a H-bridge inverter which output power is 1300 W. The dc input of inverter is 310-400 V. The Ids of MOSFET is 80 A and the Vds is 650 V. ...
4
votes
0
answers
109
views
Strange Timing with STM32F401 ADC
I'm observing a strange timing behavior with the ADC of an STM32F401 dev board (Black Pill). I have pin A0 connected to a 10k potentiometer via a 10M resistor (I know the impedance is high, I wanted ...
4
votes
0
answers
72
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 ...
4
votes
0
answers
663
views
STM32 Software Interrupt Trigger Any
STM32F746-Disco
Windows 10
STM32CubeIDE 1.8.0
I've just finished writing my first minimal bare metal UART DMA driver (CMSIS only), and both reception and transmission work ok, but then I thought I ...
4
votes
0
answers
409
views
Why won't DS3231 Real Time Clock continue ticking when powered only from VBAT?
I've got a custom STM32 board that uses a DS3231 RTC for date/time stuff. When the board is fully powered I can communicate with the DS3231 over i2c and write and read the time/date. Once the power is ...
4
votes
0
answers
324
views
Problem with reading data from I2C Temperature Sensor with stm32
Hi I'm pretty to new to embedded programming and unfortunatly I faced a problem when trying to do an excercise with STM32F103RBT6 Nucleo 64 Board and LPS25HB temperature/pressure sensor. I try to read ...
4
votes
0
answers
340
views
Wait make the STM32L073RZ freeze in stopmode
With my STM32 I'm trying to configure a deepSleep mode and use RTC to generate interruption (actually each 30 seconds).
When my STM start, this one configure the RTC and directly go in Stop mode. ...
4
votes
0
answers
1k
views
Master-slave timing on ARM Cortex-M0
I have set up a slave timer that starts counting when the master timer is enabled.
I want to know if the slave starts counting when the master timer receives a valid edge (my configuration is count ...
4
votes
0
answers
4k
views
UART reception problem when SysTick Interrupt is enabled
I'm using a STM32F411RE-Nucleo board and generating a project with Cube MX for System Workbench. The problem is that HAL_UART_Receive function doesn't receive input ...
4
votes
0
answers
3k
views
How to know the memory occupied by the various memory segments in a microcontroller
I'm using STM32 based microcontroller, IAR embedded workbench and STlink v2 debugger. I just want to know how to check the memory utilized/used by the program/system in various memory segments like:
...
4
votes
0
answers
630
views
Few SPIs at the same time as a bus?
According to http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1031/LN775/PF216846,
All STM32F1xx-series MCUs (and up) "offer standard communication interfaces (up to two I2Cs, three SPIs, one HDMI ...
3
votes
0
answers
405
views
STM32 ADC doesn't go faster than 10kHz
I'm struggling myself working on STM32F446RE (Nucleo-64).
I'm using a Bare Metal approach, so no Cube MX generated code here :) .
The microcontroller works at 16MHz, using the HSI internal clock.
I ...
3
votes
0
answers
285
views
Regenerative braking on BLDC motor
I am trying to design regen Braking for BLDC motor controller I used three switch topologies for regenerative braking.
In three switch method, high-side MOSFET S1, S3, and S5 are kept OFF and low-...
3
votes
1
answer
521
views
Programming with OpenOCD config file - how do I know my layout_init signal?
we designed a custom board that contains wifi module: EWB-STERLING,(453-00014R ) with STM32F412 chip.
I succeed in programming the module, but I noticed that it does not send a reset after each ...
3
votes
0
answers
973
views
How to timer-triggered multi-channel ADC conversion run in STMH7
I've managed to get the timer-triggered ADC to run for single-channel conversions where an interrupt routine is called upon completion of the conversion. However, I need three channels to be converted ...
3
votes
0
answers
504
views
Data Logging Medium: SD Card or USB
I am on a project that requires data logging and I am using an STM32F1 MCU. The amount of data is around 400 bytes per log entry. One of the environmental conditions of the deployment is vibration. It ...
3
votes
0
answers
4k
views
ST-Link V2 - Firmware Update Error
I purchased a few ST-LINK V2 debuggers / programmers and they were all clones as expected but I was only able to update a single one past V2.J17.S4. For the rest, I just get the error attached. ...
3
votes
0
answers
319
views
Migrating from STM32
Our company spent couple years streamlining development and porting everything from a mess of different platforms to one unified STM32-based architecture. And now with global chip shortage it came ...
3
votes
0
answers
835
views
Custom USB Gamepad Working But Not Detected In-Game
I've created a custom HID gamepad using an STM32L151C8T6 (probably irrelevant) and my computer recognizes the device using the gamepad tester application built into Windows 10.
I can verify the ...
3
votes
0
answers
805
views
STM32L4 LPTIM as pulse counter of intermittent pulses fails when initializing with no pulse
I'm working with LPTIM as a Pulse Counter on a STM32L432KC, I have a rain gauge connected to LPTIM1 (PB5) and a anemometer to LPTIM2 (PB1). Both configured on STM32CubeMX as Standalone: counts ...
3
votes
1
answer
801
views
STM32 TIM2 PWM and TIM 5 basic mode simultaneous output issues
Using an stm32f411re I want to generate a PWM of 20% Duty Cycle with a period of 200uS and simultaneously I want a basic timer to be ticking in the background that sends an interrupt every 70uS (that ...
3
votes
0
answers
803
views
Increasing system clock frequency on STM32F303 drops I2C clock proportionately - why?
I'm trying to figure out a weird little issue I've discovered while debugging another element of my code.
I've got a STM32F303K8 reading and writing to an I2C peripheral.
The I2C clock speed is ...
3
votes
0
answers
92
views
Hard fault on only one of two identical STM32F405 boards
So I've made two prototypes of a new custom board with a STM32F405RG microcontroller at heart and while one of them works totally fine, after a few seconds or more I'm getting a hard fault on the ...
3
votes
0
answers
513
views
Address Sent bit is not set on STM32F4 Disco
I am trying to interface my STM32F4 Discovery board with a sensor that works over i2c, since the sensor required a specialized i2c protocol, I decided to implement my functions using registers. But ...
3
votes
0
answers
691
views
STM32 read external FIFO through FSMC
I want to use FSMC of STM32F429 to read external FIFO implemented in an FPGA MAX10. Since no mode of FSMC can fit the FIFO interface precisely, I try to use the modified synchronous multiplexed PSRAM ...
3
votes
0
answers
795
views
How to implement multiple functions on single push button
I am using a STM32 Nucleo MCU and trying to pull a multi-function single-button method.
I need a way to implement this form of functionality for a single push-button:
Push 1: function 1
Push 2: ...
3
votes
0
answers
159
views
Verify Total conversion time of ADC1 STM32F303
I am using ADC1 channel1 of STM32F303 in Time triggered mode. TIM1 is used to generate update event and is used as trigger source for ADC1. Time Trigger comes at 1kHz. I want to verify the total ...
3
votes
0
answers
758
views
Weird problem on STM32 ADC with Interleaved Mode
I am sampling a signal on the STM32F3 Discovery board (stm32f303vct6) with two ADCs working in interleaved mode. It works great with a 200kHz 1V sine wave. But when I apply 10kHz 100mV sine wave, I ...
3
votes
0
answers
1k
views
STM32f7 ADC DMA transfer not populating the buffer
I'm trying to compute the FFT of a 100 kHz signal from the STM32f746G discovery board using the HAL and CMSIS DSP libraries and I've run into a few issues.
My first issue was trying to trigger the ...
3
votes
0
answers
2k
views
STM32F7 - Quad SPI dummy cycle behavior
I am working with the STM32F767ZIT6.
At the moment I am exploring the QuadSPI peripheral.
After setting up the peripheral with the following configuration I noticed some undesired behavior of the data ...
3
votes
0
answers
2k
views
STM32F429ZIT6 with SDRAM IS42S16320F Read/Write Issue
I designed a board which is containing two SDRAM (IS42S16320F) and STM32F476ZIT6 MCU (and other components also). I can access the SDRAM but the data is changing independently from the code. My board ...
3
votes
0
answers
4k
views
STM32F4 USART USB communication with PC?
I am trying to use STM32 provided example of USART called "HyperLink" which basically runs USART1 on ports PA9 and PA10.
The problem is that my computer does not find any new COM ports.
Do I need ...
3
votes
1
answer
521
views
STM32F401 UART noise
I have device with an STM32F401 and a SIM800L. When the SIM800L sends data I have noise (usually 1 byte) received by the STM32 on UART2 connected to the SIM800. If I use FTDI instead of STM32 I never ...
3
votes
1
answer
4k
views
STM32 - How to run the USB DFU In application programming, in Linux command line
I'm using the STM32CubeProgrammer application in Ubuntu 16.04, running the "STM32_Programmer_CLI" in USB DFU mode, to flash STM32H743 device, with BOOT0 connected to 3V3.
Example for ...
2
votes
0
answers
76
views
STM32 RAM memory write HARD FAULT
I'm using STM32H755ZIT6 and I do have a global array in main.c file of CortexM7 :
...
2
votes
0
answers
71
views
I2C register reading with long wait time
I'm developing a vibration and temperature analysis system.
To do this, I have developed a sensor based on an STM32L053C8 chip and a KX122-1037 accelerometer.
Looking at the datasheet, this ...
2
votes
0
answers
56
views
Flashing STM32h562ZI (on NUCLEO-H563ZI board) using μVision5
I am trying to make a project with NUCLEO-H563ZI in μVision5, starting simple with opening the embedded LED on the board.
main.c:
...
2
votes
0
answers
89
views
STM32f030 Inconsistent clock
I am trying to write my own microsecond delay function for an STM32f030R8t6 by using the counter function on Timer 3.
The first time I power the microcontroller up after flashing the delay works ...
2
votes
0
answers
581
views
SD Card CLK stops working properly on STM32F4 with SDIO connections
I have an SD Card socket connected to STM32F4 with the connections as follows:
The firmware uses the following codes to initialize the SDIO:
...
2
votes
0
answers
90
views
Nucleo32 with STM32F303K8 crashes when setting PA2 as Interrupt and triggering it
I am using a nucleo 32 for my project. I am using arduino and creating a TCP modbus and RTU modbus server.
I have set the pins as folows:
Description
Type
Arduino
STM32
Pin Number
Pulse input 1
...
2
votes
0
answers
225
views
Which instructions do I use to be able to use UART directly on my STM32F107 microcontroller?
I've tried to figure this out on my own but after almost a week I'm still at more or less the same place where I started. So, I have an STM32F107 microcontroller on a board, which is linked to another ...
2
votes
0
answers
212
views
STM32F107 CAN software driver does not work
I am using ST drivers to use CAN bus on an STM22F107 according to the code below. It does not work. The code is as below and is available here.
...
2
votes
0
answers
1k
views
How to use DMA to sample external ADC (16bit ADS8688) using SPI with both single ADC and daisy chain configurations
I am using an STMF446ZE MCU for a data acquisition + engine control unit application. My application uses four ADS8688's to sample 32 sensors. 28 of them are required to be logged at 100 Hz while the ...