Skip to main content

All Questions

Tagged with or
970 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
229 views

FLASH memory corruption

I have a stm32f030c8t6 which I wish to save some data in its FLASH memory. I use Address Page30 which is 0x08007800 in memory map. it is in 7th Sector. I've developed my code and easily saved some ...
Ala Shafighnia's user avatar
2 votes
0 answers
523 views

How to prevent voltage spike from BLDC motor in ESC circuit

I'm implementing the circuit below by modifying it using STM32 (Bluepill) and adding some decoupling capacitors (100nF) to the bluepill and LM339 with the supply from the battery also connected to the ...
Ujanderas's user avatar
2 votes
0 answers
1k views

STM32 ethernet and TCP issues with firmware 1.27.0 and cubeide (probably at sending messages)

I would like to use the TCP/IP protocol (with LwIP, HAL library, without freeRTOS) in a project but I face some portability issues. I'm starting with TCP echo client example as in chapter 6.1.1 of ...
Damien LUCAS's user avatar
2 votes
0 answers
218 views

Using CAN bus on a NucleoH743 with Mbed

CAN bus is not working on my project. We are using a Nucleoh743 (STM32h743) programming it with mbed (Mbed OS 6.13) I have made sure the bus is properly made, with the correct termination resistors, ...
Diego Garcia-soto's user avatar
2 votes
0 answers
597 views

UART communication problem between Raspberry Pi 4 and STM32F767ZI

I'm trying to debug a problem with the UART communication between the raspberry pi 4 and an STM32. Indeed, I try to send the number 1 from the raspberry pi to the stm32 but I can't get the right ...
ChristenTen's user avatar
2 votes
0 answers
280 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 ...
Hammdist's user avatar
2 votes
0 answers
320 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 ...
Michael's user avatar
  • 187
2 votes
0 answers
428 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 ...
APC77's user avatar
  • 21
2 votes
0 answers
1k views

Power VDDUSB on STM32 with 1.8V power supply

I'm working on a STM32WB device which is always powered by battery or preferrably USB, if available, and a 1.8V power supply. For the USB peripheral to be operational, VDDUSB must be supplied by a 3....
lulle2007200's user avatar
2 votes
0 answers
257 views

VL53L1x gives error VL53L1_ERROR_CONTROL_INTERFACE (-13) when running VL53L1_WaitDeviceBooted

I have a VL53L1x TOF sensor connected to I2C3 of STM32L432KC. This is the circuit diagram: When we connected this circuit, we are continuously getting maximum value as the output (255, -1, 65535) On ...
Shravya Boggarapu's user avatar
2 votes
0 answers
268 views

How to overclock STM32F303VC and make it work at 72MHz?

I am trying to overclock my STM32F303VC. Unfortunately I can't due to a HARD FAULT EXCEPTION. Could you help me to find the error? I also attached the code. ...
mattia flagiello's user avatar
2 votes
0 answers
2k views

UART DMA Buffer Problem

I have a problem with DMA receive function, when I stop the HAL_UART_DMAStop(&huart2); dma buffer doesnt clean, so I see the all data in buffer, ( I am using NORMAL BUFFER) when I send 17 ...
gogogo's user avatar
  • 289
2 votes
0 answers
568 views

Latch SPI MOSI and MISO with opposite phase on STM32

Is it possible to configure the STM32 SPI peripheral such that MISO data is latched on the same clock edge where MOSI data is loaded? Usually (for CPOL=1 and CPHA=1) MOSI updates on the falling edge ...
Mike's user avatar
  • 533
2 votes
0 answers
336 views

SMBUS on STM32F091

Any example code available to implement smbus(master and slave) interrupt mode on stm32f091rc ? Tried using the HAL functions was not successful? In Master mode to transmit I use ...
vinay's user avatar
  • 21
2 votes
0 answers
4k views

STM32 - Using Timer as time base source for HAL in FreeRTOS application

I am learning more about FreeRTOS by making a task-based program. My problem comes when initializing and configuring the HAL time sources. I read that it is necessary to choose another HW timer as ...
M.Brian's user avatar
  • 41
2 votes
0 answers
73 views

Understand how to integrate STM32F407VG MCU on custom PCB and program it

I have been messing around with the STMF407VG for a few weeks now using a discovery board. Been the steep learning curve but I think I have made significant progress on learning firmware development ...
joe's user avatar
  • 183
2 votes
0 answers
181 views

Change DMA memory content

I need to change the DMA content(the values of the memory) for my application(doing animation on ws2812b strips). DMA circular mode DMA with PWM generation To further clarify, here's code for a ...
unkownhihi's user avatar
2 votes
0 answers
151 views

How to improve a high frequency square wave for laser imaging

I am trying to create a current source for laser direct imaging and I have a problem in the circuit I cannot solve. The laser is a 120 mW 405nm diode and I use it in a laser module from a laser ...
hennep's user avatar
  • 443
2 votes
0 answers
716 views

ADC Overrun with Multimode, Scan and timer-triggered configuration

I'm using the STM32F446VE with 3 ADCs. I have a 50 kHz PWM running and want 2 of the ADCs to measure 2 Channels synchronized with the 50 kHz PWM. To achive this I used the regular simultanuous dual ...
besinnungslos's user avatar
2 votes
0 answers
362 views

N-Channel MOSFET Circuit

a friend of mine developed this Schematic and Circuit. The Problem is, on LIN_BUS (please ignore the Name) should be KL15 Volage (13.8V) if the FET switches. But if FET1_CNTRL is LOW (0.0V) the ...
vt1111's user avatar
  • 53
2 votes
0 answers
320 views

USART2 Rx not working, Bluepill / STM32F103C8T6

I'm using Libopencm3, USART1 and USART3 are working fine, but the USART2 makes problems. I can send bytes, when i get one, the IRQ handler function is called, but using usart_recv() i get nothing, do ...
G.Vitelli's user avatar
  • 123
2 votes
0 answers
573 views

STM32 Timer Discrete Jitter

I'm using a STM32F746 running at 200MHz. A timer (tim2) is counting up at 100MHz and triggers an update interrupt with the following simplified ISR that writes a pattern to GPIOB ...
1uk3's user avatar
  • 45
2 votes
0 answers
3k views

MCP2551 with STM32 MCU

im learning about the CAN protocol, and bought the transceiver module MCP2551 like this: I made the driver for CAN controller first in loopback mode for debug, im sending the numbers 1,2,3 and 4 with ...
Bruno Otavio's user avatar
2 votes
0 answers
295 views

STM32F103 random reboots

we have made a 2 layer board for a STM32f103, and apparently it works fine but we get a random resets now and then. When that occurs there is a 1 in the Bit 27 PORRSTF: POR/PDR reset flag and Bit 26 ...
Jordi Cook's user avatar
2 votes
0 answers
62 views

Can't seem to properly generate a delay via timer

So I am trying to create a delay using a timer but doesn't seem like it's working as expected. With a clock of 16MHz and a prescaler of 1, it should take 10us to reach a count of 160 (unless I did ...
MKD's user avatar
  • 165
2 votes
1 answer
2k views

STM32 HAL_ADC_Start() ends with HAL_ERROR

I'm new to microcontroller programming and I have a problem I can't solve. I am using STM32 Nucleo board L4R5ZI and I try to read the analog value on one of the pins, and then use the ADC to convert ...
Artii's user avatar
  • 29
2 votes
0 answers
1k views

ADC in STM32F103 drops ouput voltage from unity buffer

I'm building a signal analyzer based on STM32F103RB6 placed on a noname board with the following schematics: I'm trying to normalize the AC input signal initially centered at 0V. The amplitude is 2....
roman's user avatar
  • 213
2 votes
0 answers
298 views

CAN bus traffic is destroyed for unknown reason

I am a bit stuck with connecting several STM32F405 with BeagleBone black via CAN bus. Strange things happen when I connect 3 stm32 and 1 BB. I have checked that BB works perfectly with any ...
Юрий Камнев's user avatar
2 votes
0 answers
1k views

how to handle 'heavy' task in FreeRTOS

I know that each task in FreeRTOS should have a vTaskDelay() to release CPU resource to other tasks periodically. However, when there is a very time-consuming function in a task, like read a large ...
Ross's user avatar
  • 570
2 votes
0 answers
970 views

STM32F4 HardFault caused by Timer?

I built a STemwin Project with Cubemx and run this project on STM32F429ii based PCB. Every time when it reached the GUI_INIT() which was related to the memory allocation, it ran into HardFault_Handler(...
Ross's user avatar
  • 570
2 votes
0 answers
179 views

Looking for help improving power control circuit

I am looking for ideas on improving the circuit below. Any constructive criticism is very much appreciated as well. The following is a long explanation how I arrived at this monstrosity, it can be ...
Maple's user avatar
  • 13.1k
2 votes
0 answers
217 views

STM32F103 timer behaves differently after hardware reset instead of st-flash reset

I'm learning to program the STM32F103C8 Cortex-M3 (on a BluePill board) and was playing around with the general purpose timers (TIM2 to TIM5) because I wanted to time some routines. In my simple ...
jjpprr's user avatar
  • 163
2 votes
0 answers
1k views

stm32 does not exit sleep

When trying to implement sleep mode it appears the code enters and exits sleep mode once and then gets stuck in sleep mode after and will not wake back up. I posted some code below of what I believe ...
happyhappyhappy's user avatar
2 votes
0 answers
99 views

Powering down parts of a pcb to conserve power, is it possible? Any caveats?

I'm building a USB 2.0 bus-powered STM32F429-based audio device that is able to run in a stand-alone mode from a phone charger, or running as a USB device when connected to a computer. To comply with ...
Tim Walther's user avatar
2 votes
0 answers
2k views

STM32CubeProg vs STLINK Utility

There are 2 software tools provided by ST to flash their STM32 MCUs namely STM32CubeProg and STLINK Utility STM32CubeProg Page says: STM32CubeProgrammer (STM32CubeProg) is an all-in-one multi-OS ...
scico111's user avatar
  • 927
2 votes
0 answers
3k views

STM32 HAL PWM output with DMA misbehavior

I use the Blue pill STM32F103C8T6 to generate variable duty cycle PWM with DMA and using HAL library. And stuck with undesired results. First, I generated code with STM32CubeMX v5.0.1, HAL v1.7.0, ...
Boroda's user avatar
  • 21
2 votes
0 answers
356 views

STM32F429 PWM GLITCH

I have set up Timer 1 Channel 1 for pwm mode 1. I used the STM32CUBE to generate code for MDK-ARM. Parameters as below- ...
user201029's user avatar
2 votes
0 answers
3k views

stm32 external interrupt

I am working with a stm32f103 and am trying to get the external interrupt done. My code is: ...
Lukas_M94's user avatar
2 votes
0 answers
793 views

STM32L0 ADC Interrupt Low Sampling Rate

My observed sampling rate is much lower than expected and I cannot understand why. I have the discovery STM32L053C6 Discovery board and I want to use ADCs sampling. I started from the example ...
clem steredenn's user avatar
2 votes
0 answers
131 views

nucleo-64 103rb EXTI stays pending

The PC13 EXTI interrupt (EXTI15_10) configured here keeps firing none stop. Most other questions about this same topic indicate that the respective EXTI_PR pending bit needs to be cleared in the ISR. ...
Chris's user avatar
  • 121
2 votes
0 answers
292 views

STM32L1 Discovery Kit 5MHz PWM Generation

I have been using the STM32L1 Discovery Kit with the STM32L152RCT6 MCU. A project that I am working on requires me to output two PWM signals. One of these is a 100KHz square wave and the other is ...
afranca88's user avatar
2 votes
0 answers
638 views

L298 distorts signal

I connected STM32 F334R8 microcontroller to L298 H-bridge. I made some measurements. The problem is output signal on L298 has quite slow slopes and is not as sharp as input signal. I do not understand ...
Madras's user avatar
  • 136
2 votes
0 answers
550 views

Porting RTOS in STM32F4 board

I want to port a RTOS in STM32F4Disco board. I'm a newbie in this area and unable to understand how to adjust the configurations according to a new target and the whole porting process. So right now, ...
Shaswati Saha's user avatar
2 votes
0 answers
918 views

USART on STM32F411 reads junk after MCU wakes up from STOP mode

I am working on a board that uses an STM32F411 connected to a bluetooth module over USART. One of the goals is to enable Low-power consumption in STOP mode. A brief summary of the platform: The ...
SSB's user avatar
  • 21
2 votes
1 answer
3k 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....
Terraviper-5's user avatar
2 votes
0 answers
5k views

STM32F429 HAL library CAN_Transmit timeout

I'm having a bit of trouble with the ST32CubeF4 v1.13.0 example of a CAN network. I'm using an STM32F429 discovery board, but I have ported over the CAN network example from the STM324x9_EVAL board. I ...
Mic De Duiwel's user avatar
2 votes
0 answers
2k views

How to properly send stop condition when using DMA with I2C?

I'm using DMA transfer to get 1024 bytes from master (STM32F407VG) to slave OLED screen (SSD1306). The library I'm using does this: ...
Terraviper-5's user avatar
2 votes
0 answers
6k views

STM32F4 HAL - PWM Phase shifting channels on the same timer

I've configured my STM32F407VG (STM32F4Discovery) TIM4 timer using the following code: ...
josef.van.niekerk's user avatar

1
2
3 4 5
20