Search found 9 matches

by dusan82
Wed May 28, 2025 8:53 pm
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'
Replies: 4
Views: 5456

Re: Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'

I managed to make blink work in STM32L011 in CubeIDE. Maybe in the arduino menu this particular chip should be shown as "Generic L011F4Px (unsupported, low memory)" or something like that.
by dusan82
Wed May 28, 2025 11:34 am
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'
Replies: 4
Views: 5456

Re: Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'

I don't use any variable it's just a blink example changing 1 pin.
How to disable unused peripherals and not needed features?
by dusan82
Wed May 28, 2025 8:33 am
Forum: STM boards (Discovery, Eval, Nucleo, ...)
Topic: Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'
Replies: 4
Views: 5456

Blink on STM32L011: section `._user_heap_stack' will not fit in region `RAM'

Arduino Version: 2.3.6 Date: 2025-04-09T11:24:04.835Z CLI Version: 1.2.0
STM32 MCU Based Boards 2.10.1
STM32CubeProgrammer-2.19.0
Ubuntu 24.04.2 LTS

I'm trying to make blink work with Generic STL32L011 series (Generic L011F4Px), specifically STM32L011F4P6. When I try to compile it, I get this ...
by dusan82
Fri Feb 14, 2025 2:26 pm
Forum: General discussion
Topic: STM32G030 how to use DMA to read ADC faster?
Replies: 7
Views: 4309

Re: STM32G030 how to use DMA to read ADC faster?

I continued working on it, most examples on internet were for F103 so I switched to F103 and eventually made it work, here is code that reads 2000 samples at 400kHz on F103 using DMA. The HAL_ADC_ConvCpltCallback is not triggered so I just put delay(100) there. After pressing "enter" in serial ...
by dusan82
Thu Feb 13, 2025 6:51 pm
Forum: General discussion
Topic: STM32G030 how to use DMA to read ADC faster?
Replies: 7
Views: 4309

Re: STM32G030 how to use DMA to read ADC faster?

- I added pinMode(*, INPUT_ANALOG) to all 16 adc pins just to be sure and set voltage there to approx 2V
- I added extern C
- still nothing, all zeroes
- if I comment out init_adc_to_use_dma(); and use analogRead(PA0) or any other pin it shows some value, but if I call init_adc_to_use_dma() even ...
by dusan82
Thu Feb 13, 2025 12:28 pm
Forum: General discussion
Topic: STM32G030 how to use DMA to read ADC faster?
Replies: 7
Views: 4309

Re: STM32G030 how to use DMA to read ADC faster?

Here is updated code but still all zeros:

#include "stm32g0xx_hal.h"

ADC_HandleTypeDef hadc1;
DMA_HandleTypeDef hdma_adc1;

uint32_t buffer[50];

void init_adc_to_use_dma() {
// Initialize the ADC
hadc1.Instance = ADC1;
hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV4;
hadc1.Init ...
by dusan82
Thu Feb 13, 2025 11:27 am
Forum: General discussion
Topic: STM32G030 how to use DMA to read ADC faster?
Replies: 7
Views: 4309

STM32G030 how to use DMA to read ADC faster?

I need to read ADC faster than analogRead can, so I need to use DMA. Here is my code. It doesn't work it prints all zeros:

#include "stm32g0xx_hal.h"

ADC_HandleTypeDef hadc1;
DMA_HandleTypeDef hdma_adc1;

uint32_t buffer[50];

void init_adc_to_use_dma() {
// Configure the global features of the ...
by dusan82
Tue Nov 07, 2023 9:51 am
Forum: General discussion
Topic: What is the fastest way to change pin mode from INPUT_PULLUP to OUTPUT and back
Replies: 3
Views: 9347

What is the fastest way to change pin mode from INPUT_PULLUP to OUTPUT and back

I need to change pin mode on PB6 and PB7 fast on STM32F103. Originally I was using:

pinMode(PB6, INPUT_PULLUP);
...
pinMode(PB6, OUTPUT);

Then I extracted minimal code from pinMode function:

void pin_function_fast(PinName pin, int function) {
uint32_t mode = function == INPUT ? 0 : 1; // STM ...

Go to advanced search