cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in reading adc data (DMA based) for STM32L011F4 due to code size

PJp
Associate

Hi

I was using STM32L011F3 controller for my project. I am using ADC for 4 channels and I2C , timer peripherals. I downloaded stmcube32l0, in that STM32L011K4-Nucleo driver files i took because it is similar to my series controller.

I developed the application code by using the STM32L011K4-Nucleo driver files. IAR embedded work bench is my IDE. Everything was working fine.

Recently we changed into STM32L011f4 controller. I used the same code which i used earlier and everything is working .

And I added eeprom read/ write functionality also. Only When i am adding this eeprom related code, ADC giving different values / wrong or with some offset .

Is there any problem happening to adc/dma due to the code size increment.

New code size is given below. STM32L011f4 is having 16KB flash memory

 10 952 bytes of readonly code memory

   76 bytes of readonly data memory

  1 544 bytes of readwrite data memory

please let me know whether i need to change any settings related DMA /ADC

2 REPLIES 2

More likely some interaction with your code than simply the size.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead

The memory related to your issue is RAM, plain code size does not matter. More probably variables involved with your EEPROM code.

Check the DMA target address, buffer size, and buffer address. DMA onto stack targets don't work well.