586 questions
0
votes
0
answers
62
views
How to configure DMA on STM32 using ADC
I'm really frustrated that this set up never works at all in any mode or any configuration as expected. Alread read the documentation 1000x times, looked for examples, but besides the crap ...
1
vote
1
answer
253
views
custom bootloader for stm32F407vgt6e
I'm writing a custom bootloader from scratch for an STM32 project. Currently, the bootloader only initializes and jumps to the main application. I'm gradually adding peripherals one by one. Everything ...
1
vote
1
answer
126
views
How can I make all functions from the HAL standard library file work from RAM at once?
There is a HAL library of functions for working with flash memory. I want all the functions of this library to work from RAM. How can I do this correctly, without writing _attribute_((section("....
3
votes
1
answer
208
views
Using gcov on STM32
I'm trying to use GCOV for code coverage on my stm32F439ZI.
I just have a quick LED example set up, no OS, no filesystem. My goal, i think, is to edit the write function that gcov use to write the ...
0
votes
0
answers
122
views
Understanding ARM Cortex-M4 Pending Interrupt Behavior and Preemption Mechanism
I am learning how ARM Cortex-M4's pending interrupt works and how ISRs are pre-empted by higher priority interrupts (Basically how NVIC works). I have learned that an interrupt configured with higher ...
0
votes
0
answers
94
views
stm32f769 discovery kit printf and ITM_SendChar
I am using a stm32F769-Disco development kit with stm32cubeide and touchgfx.
I have made an project from touchgfx and opened it from subeide.
The project is loading normally and i have overwritten the ...
0
votes
1
answer
87
views
Bootloader on STM32 MCU
I am trying to develop a bootloader with STM32F469BIT mcu. First of all, I divided the 2048K flash area allocated to me into zones according to certain sector addresses. These areas;
Bootloader -> ...
0
votes
0
answers
45
views
Problem with sending data over serial port with Python
I am currently working on software bootloader implementation and using Python to handle sending data from my PC and receiving acknowledgement signals. Problem that I stumbled upon is that I am getting ...
4
votes
1
answer
162
views
STM32F407 Software Bootloader - Problem with receiving UART data
I am trying to make software bootloader for my STM32F407 project and I ran into some issue. The whole idea is that I send data using UART protocol from my PC to STM32F407. Data that I am sending is ...
1
vote
1
answer
43
views
STM32F407 TIM PWM mixed offset signals
I'm working on a project on an STM32F407-DISC and I want to output the attached signal via PWM, I would like to offload as much of this from the processor as possible while keeping the timing of these ...
1
vote
0
answers
95
views
Issue with USB CCID Communication on STM32F4
Hi StackOverflow Community,
I am encountering an issue while implementing USB CCID functionality on an STM32F4 MCU. I recently integrated the CCID driver from the following repository into my project:
...
0
votes
0
answers
62
views
STM32F429: CAN cannot receive message from host PC
I am trying to use my STM32F429IGT6 CAN to receive some data from the host computer. The data is basically 4 16-bit unsigned integers (8 bytes in total), the message ID is 0x16 and uses the 11-bit ...
0
votes
1
answer
114
views
STM32F401-Keil I cannot build blinky example and send to nucleo boards.Please Help me?
I want to create a basic LED blinking application with Keil MicroVision on the Nucleo STM32F401.
However, as shown in the image, the Keil program gives errors at two different points. It shows issues ...
1
vote
1
answer
191
views
I am getting DMA Transfer error interrupt every time I try to send a byte through PC COM Port to STM32F446RE
I am trying register level programming for STM32F446RE Nucleo-64 board. I want to receive data through UART in circular mode using DMA. I am getting DMA Transfer error interrupt every time I try to ...
0
votes
1
answer
167
views
STM32F4 : Send/receive data to MCP25xxFD using SPI with DMA
I am interfacing the can_fd controller MCP2517FD with the STM32F4 (Cortex-M) using the SPI HAL library.
using the controller driver :https://github.com/SDibla/Cortex-M4-MCP2517FD_Driver
In blocking ...
0
votes
1
answer
116
views
Interrupts on STM32F407G discovery Micro controller with HAL library to blink led
I am trying to create a metronome by using the led on my microcontroller board to blink at a specific number of beats per minute in order to figure out how to do hardware interrupts at specific ...
0
votes
0
answers
59
views
GPIO edge Interrupt not working on STM32G491RET
I am trying to implement a digital waveform capture using an external interrupt on a GPIO.
Here is the test code logic :
Enable a GPIO as output (PA5) and toggle it at 20Hz
Enable another GPIO as ...
2
votes
0
answers
320
views
STM32F411 SPI read always returns 0xFF
I am trying my best to read data from an SD card using SPI. It works using HAL, but it's very slow, so I am trying to code my own SPI driver. I am stuck on trasnmitting data.
The GPIO implementation ...
2
votes
0
answers
402
views
OpenOCD Raspberry pi Bit Bang SWD Error connecting DP cannot read IDR
I am posting my question just as I have posted on the forum of STMicroelectronics.
I had been programming my STM32F407 MCU for almost 6 years using OpenOCD's GPIO Bit bang driver over Raspberry-pi for ...
1
vote
0
answers
28
views
The buzzer does not operate properly when restarted by the sw_mode (STM446RET
I am working on a program where pressing switch 2 while music is playing increases the counter value, and if the counter exceeds a certain value, it counts as success. However, if switch 2 is pressed ...
1
vote
0
answers
55
views
Can STM32 PWM settings affect other timer settings?
#include "Main.h"
#define MAX_Intensity 1600
static volatile uint16_t Intensity = 10;
void Timer4_Configuration(void)
{
TIM_TimeBaseInitTypeDef TIM_BaseStructure;
...
0
votes
0
answers
96
views
Software UART handled in interrupt mode makes my data corrupted
I'm currently working on getting my barcode scanner to work using soft-uart library by liyanboy74 on STM32 NUCLEOF446RE.
First of all when falling edge on my GPIO pin is detected, GPIO_EXTI_Callback() ...
-4
votes
2
answers
129
views
How to read a whole uint_8 variable?
I have a 8 bit variable received_control. This variable should store some 8 bit data. In my use case, I need be able to read all the bits, even those that are 0. Problem is that if my most significant ...
0
votes
1
answer
135
views
STM32F411CEU6 program halts when switching system clock to PLL
I am trying to achieve high clock speeds on my STM32F411CEU6 board (96 MHZ) by tweaking the PLL clock without HAL. I have set the PLL clock source to HSE (25 MHz). My code halts whenever my debugger ...
0
votes
0
answers
115
views
STm32F: Issue with Alarm B Not Triggering After Wake-up from Standby Mode
I am working on an STM32 project where I need to manage two RTC alarms: Alarm A for periodic wake-ups and Alarm B for switching modes after a specific timeout. The system enters standby mode and wakes ...
-1
votes
1
answer
692
views
why calibration adc and dac is important in stm32f4?
I am using STM32F4 to perform sensing on my circuit. Before doing so, I would like to calibrate it first. I am doing this because I read that calibration is 'important,' but I don't understand why ...
1
vote
0
answers
38
views
I have a problem with ITM Data Trace on STM32F407
I have a non-comercial download of STM32Cube IDE. I want to use the ITM Data Trace on a STM32F407 G disc1. In the main() call to initialise_monitor_handles(); the fun body in the system file is empty....
3
votes
1
answer
114
views
What's the reason for that noise and why do my exact values not produce any noise?
I've been working with an STM32F4, wanting to generate notes, passing values to a DAC like so:
float playNote(float noteFrequency, float t)
{
float w = 2 * PI * noteFrequency;
return sinf(w * ...
0
votes
1
answer
457
views
How to understand pinout diagram of STM32 micro controllers [closed]
I am new to embedded systems. I started with arduino and learnt programming online and have done some projects with it as well. Now I bought STM32 nucleo board to learn more in embedded systems. I ...
-1
votes
1
answer
405
views
How to calculate RAM available in IAR workbench or Using .map file?
Want to read available RAM from the IAR Project using .map file?
We have assigned 8Mb of RAM and extracting the .data and .bss segment from the .map file and calculating the used RAM. Is that correct ...
0
votes
0
answers
92
views
Micropython control stepper motor problem
I use the above packaged motor control library to control the stepper motor, but after I set the driver to 6400, the set speed and acceleration have no obvious effect, and the speed is always very ...
0
votes
1
answer
294
views
PlatformIO: Best way to combine Bootloader and Application Images
I am working with two distinct Platformio projects for an stm32f4 target: a bootloader and an application. Eventually, the bootloader should be able to update the application code over the network but ...
0
votes
0
answers
95
views
How to Properly Handle DMA Triggers for Sine Wave Generation in Center-Aligned Mode 2 PWM on STM32?
I'm generating a sine wave using an H-bridge with an STM32 microcontroller, utilizing center-aligned mode 2 PWM generation. In center-aligned mode 2, the DMA triggers twice per PWM cycle: once during ...
0
votes
1
answer
374
views
STM32F411 - failing to read backup battery voltage (VBAT)
I am doing some development on a Weact STM32F411 black pill. Most of it has gone fine. However I am trying to read the voltage on the VBAT pin (backup 3V button cell) using the internal ADC, but I ...
3
votes
3
answers
563
views
STM32 F401RE, Blinking LED program (Without HAL) not working
The following code is for blinking of the on-board LED on an STM32F401RE board. I am trying to do it without using HAL. When I flash it on to the board, it blinks once and then stays on. How can I fix ...
0
votes
0
answers
60
views
cortex-m4 core clocking on st32f4 example using cmsis library
I ask for a review of the code for basic clocking of the stm32f401ccu core, for simple blinking of the LED.
void ClockInit(void){
//RCC->CR = 0x0000XX81;
RCC->CR |= (1 << ...
0
votes
1
answer
410
views
How/When exactly does Cortex-M4 (STM32 F4) switch its R13 from MSP to PSP? Do i have to manually switch if using PSP in inline asm?
I'm writing my own RTOS and I'm implementing the context switch function, where I have to use PSP. The function is written in inline assembly
I was working on another project on STM32 F4 writing ...
0
votes
0
answers
74
views
STM32 F446 Nucleo halts on Polymorphism
I'm wondering what the possible causes of an MCU halting on a polymorphic function call might be.
I have the following code. I can call the member function directly on the non-pointer variable. ...
0
votes
1
answer
629
views
STM32 HAL_TIM_PWM_PulseFinishedCallback not being called. Suspect that problem is related to use of struct or union pointers
I'm writing a Neopixel driver for STM32 based on the example provided here.
In summary, the pixels aren't lighting correctly. My latest attempt had the first row of 8 pixels light up green before it ...
0
votes
1
answer
168
views
Error jumping from bootloader to application with STM32F412
I have an issue with jumping from the bootloader to the application.
If I make the jump before entering the infinite loop, everything works, but if I do it from inside the loop, it doesn't work.
I ...
0
votes
1
answer
926
views
STM32F4 HAL_CRC_Calculate() gives false results
I have a STM32F429ZI (Discovery Board) and this really simple code, calculating the CRC8:
uint32_t data[5] = { 0x28, 0x4f, 0x4c, 0x43, 0x29 };
uint8_t crc = HAL_CRC_Calculate(&hcrc, data, 5);
The ...
1
vote
2
answers
157
views
STM32F446 SPI DMA
I am using SPI1 DMA for sending data from STM32F446RET6 to Nokia5110 LCD. But it doesn't work. When I try without DMA, it works. Is my program wrong? Full program can be downloaded via the following ...
1
vote
0
answers
133
views
STM32F412 SDIO Tx Underrun error when DMA is enabled
I am working on a project where I have to drive a SD Card. So far I have successfully implemented the initialization and reading data with DMA part. I am not using HAL libraries. The code to write to ...
1
vote
1
answer
1k
views
STM32 Nucleo64 Serial UART Communication not working in CubeIDE
I have a very simple code on an Arduino I am trying to make work on my STM32f446 Nucleo board. This is the very early stages of the project because I am simply trying to send a hex value/array to a &...
0
votes
1
answer
333
views
When configuring cmake, I would like to add the header file into one folder
Since the stm32 vscode extension was updated to 2.0, we have been developing stm32 using vscode.
It wasn't difficult to add a library that you created yourself through CMakeListes.txt.
The function I ...
1
vote
1
answer
177
views
Why is UART receiving data during MCU initialization (STM32F4)
I have code that initializes UART2 on the STM32F4 (and some other peripherals).
When the MCU completes initialization, it enters the USART2_IRQHandler and executes the Timer_Timeout_Enable function, ...
0
votes
0
answers
63
views
DWT on STM32F411 running in debug mode but not release mode
Using the example code from this site (and all other examples appear to be similar):
https://mcuoneclipse.com/2017/01/30/cycle-counting-on-arm-cortex-m-with-dwt/
The DWT counter on the STM32F411 ...
0
votes
1
answer
753
views
Why undefined symbols vApplication___Hook in FreeRTOS with STM32F4
I'm trying to build an LED blinker with FreeRTOS, but there are some errors in the project:
undefined symbol vApplicationIdleHook referenced by symbol prvIdleTask (section .text.prvIdleTask in file ...
0
votes
1
answer
239
views
How do I stop my stm32 from halting my code when it gets it?
I recently got an stm32 board, and right now I am just trying to establish communication with it by turning on the LD2 light, using platformio. Right now when I try to upload the code the board seems ...
0
votes
0
answers
379
views
STM32F4 EtherNet/IP library
I'm looking to use an STM32F407I for EtherNet/IP protocol communication with some industrial motors and sensors.
I cannot seem to find a library that would help me do that for my STM32F4.
I found this,...