All Questions
22 questions
8
votes
7
answers
83k
views
Getting PWM to work on STM32F4 using ST's HAL libraries
I'm trying to switch to the ST HAL libraries and can't seem to get the PWM to work. Compiles fine, just doesn't start.
In my main() I call the Timer initialization function:
...
7
votes
5
answers
18k
views
I2C busy flag strange behaviour
I've been using STMCUBE combined with Keil for some time now. For most part I like the HAL library and the documentation for STM32f1xx drivers is quite good.
I'm doing a project where I am using ...
4
votes
3
answers
37k
views
How to read from multiple channels of the ADC on an STM32F407?
I am working on a project wherein, I need to read the Analog outputs from 4 sources and convert them to a digital value using a single ADC module on the STM32F407 microcontroller. I want to sample the ...
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 ...
3
votes
2
answers
782
views
Multiple(five) alarm time setting in stm32f0 mcu
I am working on my hobbyist project and need to develop the alarm timings.
And RTC and Timer are new for me and I am confused in RTC Alarm time setting.
I need to make alarm with RTC for five ...
2
votes
1
answer
821
views
Where does STM32CubeMX generate AF GPIO initialization?
i was wondering where does CubeMX (when you export it to an IDE such as Atollic) generate GPIO initialization for alternate functions such as Timer capture pins, UART pin ect. (we are talking about ...
2
votes
3
answers
16k
views
HAL_CAN_Transmit_IT and HAL_CAN_Receive_IT simultaneously use problem
Synopsis: STM32 HAL Library functions HAL_CAN_Transmit_IT and HAL_CAN_Receive_IT can't be used simultaneously effectively ...
2
votes
1
answer
9k
views
STM32F4 - Reading general purpose timer count
I'm using the STM32F4 HAL library on an emulated [in QEMU] STM32F4 Discovery board, and trying to configure TIM2 (general purpose timer) and read its' count register (without an interrupt). Currently ...
2
votes
1
answer
3k
views
STM32L1xx HAL_GPIO_Init Problem
I am developing an application for a University project on my STM32L1DISCO board with the STM32L152RC MCU.
I have configured the pins and generated the init code via STM32CubeMX. I am using Atollic ...
1
vote
1
answer
27k
views
How to use SysTick_Handler (an HAL library function) in order to have a time base
In actual I need to measure speed of motor.
I have followed a procedure, i.e
use Encoder mode to get pulses from sensor.
count number of these pulses in 1 sec~1000msec using SysTick_Handler(ISR). ...
1
vote
1
answer
7k
views
STM32 interrupt does not fire
I'm using an STM32F103C8T6 (aka blue pill).
GPIO Init and interrupt handler:
...
1
vote
1
answer
3k
views
Standard Peripheral Library and HAL drivers together in Keil
it seems that:
ST has moved to Cubemx code initializer and generates only HAL
drivers
Keil has introduced DFP and Manage-Run-time-Environment which
use HAL drives
although ST's cubemx and Keil's ...
1
vote
1
answer
851
views
Setting up PWM on PA.3 of the STM32F091RC Nucleo board
I am using STM32Cube and the HAL libraries to set up the PWM.
For initializing Timer 2, I have:
...
1
vote
0
answers
1k
views
interfacing tcs3200 color sensor with STM32f746zg
I want to interface TCS3200 color sensor with STM32f746ZG. Since the TCS3200 outputs a frequency based on the amount of light received, I need some way to count the number of pulses for different ...
1
vote
0
answers
3k
views
Getting UART Overrun Error with HAL_UART_Transmit() vs HAL_UART_Transmit_IT()
On my main board I have a STM32F103ZET6 and I use HAL library V1.6 in order to program it.There is also a sensor board which is connected to my main board and this sensor sends me data through UART ...
1
vote
2
answers
7k
views
Not being able to enable PWM using the HAL TIM library on stm32f0
The goal is to use the PWM feature of stm32 HAL TIM libraries to light up 4 leds on pins 0, 1, 4 and 5
I have generated the following code using CubeMX:
...
0
votes
1
answer
244
views
CubeMX HAL Libraries state or stateless [closed]
I wonder if the STM32F4 CubeMX peripheral HAL libraries saves the internal state of the peripherals OR if they are stateless? I am concerned about this because I want to know the possibility and ...
0
votes
1
answer
69
views
STM32 PWM generation polarity changes after the DMA cycle transfer complete interrupt
I am generating PWM using TIM1 channel 1 and channel 2 along with their complementary channels. I am providing the CCR values from an array via DMA. I have written a DMA complete callback function. ...
0
votes
1
answer
1k
views
Do I really need to learn how to use registers - Programming a microcontroller? [closed]
I have a curious question. Do I really need to learn how to use registers when I program a microcontroller?
I have been using Arduino for a long time. I quit using Arduino and starting to use STM32 ...
0
votes
1
answer
453
views
strange RFM95 SPI behaviour with STM32L4 [closed]
I am using CubeMX and HAL to program an STM32L4. I am trying to communicate with RFM96 module using SPI, but I am getting nonsensical results.
According to the RFM96 datasheet, in order to read a ...
0
votes
2
answers
5k
views
STM32F303RET's core is always halted after programming
I have an STM32F303RET MCU with Eclipse, Cross ARM GCC and HAL library environment. I am using an STM32F4Discovery board as SWD programmer. My problem is when I download the hex file to the MCU I got ...
0
votes
0
answers
1k
views
MCU Package of STM32f1 series for stm32CubeMX
I am trying to download MCU Package of STM32f1 series for stm32CubeMX from the following link:
https://www.st.com/en/embedded-software/stm32cubef1.html
But the given link sends this messege that the ...