Skip to main content
NSemrHomeInit
Associate III
March 26, 2023
Question

Big char buffer declaration

  • March 26, 2023
  • 6 replies
  • 1956 views

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,

This topic has been closed for replies.

6 replies

LCE
Principal II
March 27, 2023

Share some source code and the linker script.

Then tell us please:

  • F429 SRAM size and layout
  • buffer declaration
NSemrHomeInit
Associate III
March 27, 2023

Yes, I could share the project,

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

Tesla DeLorean
Guru
March 27, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
NSemrHomeInit
Associate III
March 27, 2023

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

LCE
Principal II
March 27, 2023

> the buffer name is GyroscopeDriver

which is declared and used in which files?