Questions tagged [cubemx]
71 questions
14
votes
4 answers
How to configure VS Code to build and debug STM32 projects using cubeMX - Windows 10
I am new to the realm of STM32 programming and have been trying to find a suitable IDE for quite a while now. I know of all the other IDE's like Keil and IAR but the cost of buying them just to learn is far to steep for me at this point in time.
I…

clixxclixx
- 147
- 1
- 1
- 7
12
votes
2 answers
How to use LL (low level) drivers in CubeMX STM32?
I'm creating a blank project for a STM32F103 microcontroller using STM32CubeMX. Using HAL drivers (the default), I got a blinky example working pretty quickly, but I'd like to try out LL (low level) drivers instead of HAL.
When I go to Project >…

Alex I
- 19,689
- 9
- 86
- 158
8
votes
3 answers
STM32F4 Timers - Calculation of Period and Prescale, to generate 1 ms delay
I am using STM32F407VGT6 with CubeMX. So I was beginning with general-purpose timers and I am stuck with prescale and period values.
Basically I want to generate a timer interrupt every n(where n=1,2,3..) ms and perform some tasks.
There is lot of…

Ehsan Habib
- 135
- 1
- 5
- 12
3
votes
2 answers
CubeMX-generated USB HID device sends wrong data when both endpoint and PMA address are changed
I'm debugging a problem with a composite device that I'm creating, and have recreated the issue in freshly-CubeMX-generated HID-only code, to make it easier to resolve.
I've added small amount of code to main() to let me send USB HID mouse-clicks,…

fadedbee
- 42,671
- 44
- 178
- 308
3
votes
3 answers
Failing to receive data from UART in DMA mode
I am trying to receive 8 bytes from my pc on my NUCLEO F446RE stm32 board.
Transmitting to the pc works.
The problem is, I am unable to receive data using DMA.
I saw an example with almost the same code and it has worked for the person.
If I use the…

Knee Caps
- 181
- 2
- 9
3
votes
3 answers
HAL_SetDate sets the year to wrong value
I'm using STM32F030RCT6 with CubeMX. Device is a datalogger and RTC is the main thing that cannot fail. On Errata Sheet there is something about RTC Shadow Register.
I configured CubeMX to not generate MX_RTC_Init() function and it has been working…

sbtek
- 33
- 1
- 8
3
votes
1 answer
STM32 HAL Nucleo F446RE Quadrature Encoder
I have a problem with the quadrature encoder mode on timer TIM3 of my
STM32F446RE /
NUCLEO-F446RE:
TIM3 counts on every rising edge on the first signal.
The CNT register counts up and I read the value with 1 Hz and then
I set the register to…

Max3579
- 41
- 4
2
votes
1 answer
Issue with frequency limitation on the Timers on STM32F7
I'm having issues setting the timers on the STM32F7 dissovery board to 500 Khz. I seem to top around around 370kHz for some reason. 'm toggling a GPIO pin with a scope to the input and simply changing the Period on the timer to monitor what's…

MaskedAfrican
- 196
- 2
- 12
2
votes
2 answers
What is issue with STM32 Virtual Com Port? I can not open it
I have Nucleo STM32H743ZI board. I'm using CubeMX HAL (I tried several versions) and TrueStudio. "Virtual COM port" appearances in Windows 10 (I tried default Windows driver and ST driver) but I can not open port. My C# program write me "The…

Papayaved
- 103
- 1
- 1
- 11
2
votes
2 answers
FreeRTOS task priority and stack size
I have STM32F746ZG Nucleo-144pin board and generated the codes using STMCubeMx.
I chose the FreeRTOS which is version 10.0.0 offered by CubeMx and the toolchain is SW4STM32.
I made two tasks and the following is my function.
My code here:
void…

Hans
- 398
- 2
- 4
- 14
2
votes
4 answers
STM32F7 + FatFs = FR_NOT_READY
I am now using CubeMx 4.23.0 and FW package for STM32F7 1.8.0
MCU is STM32F746 on Core746i board.
Everything is generated by CubeMx automatically.
main.c:
SCB_EnableICache();
SCB_EnableDCache();
HAL_Init();
SystemClock_Config();
…

ub0baa
- 95
- 2
- 10
2
votes
1 answer
STM32F0 TIMx prescale settings has no effect on update interrupt
I generated my code from STM32CubeMx and wanted to generate a update event every 1µs. I work with the internal clock at 48MHz, which should be with Prescaler:0 and Autoreload:47 result to 1µs.
I use a STM32F030 with TrueStudio V.9.0.0
generated code…

K0ertis
- 121
- 1
- 9
1
vote
1 answer
STM32 Difference between Max interface clock and max timer clock
I am using TIM1 on a H743ZI with 3 PWM channels.
I am trying to maximize the PWM resolution so I need to maximize the clock speed on TIM1.
the datasheet (screenshot below) gives 120MHz and 240MHz values for Max interface clock and Max timer…

zytra
- 87
- 1
- 11
1
vote
1 answer
CubeMX & System Workbench Error "selected processor does not support ´dsb 0xF´in Thumb mode"
When I create a new Project with STM32CubeMX for STM32F103RCT and open it with System Workbench i get this Error:
Error Build
In a similar Question they said to add "-mcpu=cortex-m3" but where???
similar Question: STM32Cube - project does not build…

Jonas Bock
- 11
- 2
1
vote
0 answers
Correcting the Linker Flags for CMake
I am trying to convert an embedded gcc arm- project to use ARMClang instead of GCC.
My focus was to use CMake to automate the task of generating the make files, but I could
not figure out why I can not enforce the linker flags and I always get…

Sina S.
- 31
- 3