cancel
Showing results for 
Search instead for 
Did you mean: 

Big char buffer declaration

NSemrHomeInit
Senior

Dear ST hello,

I am working on a driver on STM32F429, and I have to declare 104 uint8_t buffers.

In some cases I am facing an issue with memory, The buffer is overwritten by another application the buffer values change when I iterate through it the buffer is shifted!

When a loop on the first elements to read and write my buffer it looks very good but when I try to loop on the whole buffer I have a strange behavior.

Some reserved elements should not be changed because I don't change them but I could see them in the watch expression changing.

Do you have any idea to help me debug my problem, please?

Thank you in advance,

6 REPLIES 6
LCE
Principal

Share some source code and the linker script.

Then tell us please:

  • F429 SRAM size and layout
  • buffer declaration

Are you using DMA?

What else is writing to the buffer?

Can you take a mutex or semaphore to stop other tasks touching the array?

Do you have an asymmetrical input / output flow rates for the data?

Why is the processing slower than the acquisition?

Can you catch up via dropping occasional packets?​

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

Yes, I could share the project,

https://github.com/semrade/Meme_project.git

Non, I am not using DMA, the buffer is updated each 10 ms using the spi bus,

I am nothing using RTOS.

 I shared the code, the buffer name is GyroAccDriver

> the buffer name is GyroscopeDriver

which is declared and used in which files?

GyroAccDriver is declared in the stm32f429i_discovery_Gyro_Acc