cancel
Showing results for 
Search instead for 
Did you mean: 

Textarea memmanage handler problem

alper
Associate II

Hello,

I have created custom board with STM32H723 and a external qspi memeory. I can store image data on qspi and showing them on lcd screen. So my external flash its working fine. When i use textarea programs go to Memmanagehandler and stuck. If i try internal flash for textarea program doesnt stuck but nothing show up on the screen.

I use CUBEIDE 1.16 and Touchgfx 4.23

Can anyone help me.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello ,

Sorry for the late reply,

Where is this line "currentLanguageTypedText = typedTextDatabaswArray[id];" ? this line inside Texts.cpp.

Actually searched many forums. And this problem was solved with the help of a Korean friend.

The problem was caused by the mpu (memory protection unit) not being configured correctly.

Thank you for your help.

View solution in original post

6 REPLIES 6
GaetanGodart
ST Employee

Hello @alper ,

 

Can you explain more in detail this sentence please : "When i use textarea programs go to Memmanagehandler and stuck.".

Can you also share the files related you QSPI and to how you change your TextArea value?

Also, does it work on simulator?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

I add a Textarea to the screen with touchgfx designer.

When debug the code step by step, calling the MX_TouchGFX_Init();

after that when debugger came to

currentLanguageTypedText = typedTextDatabaswArray[id];  line.

And than goes to MemManage_Handler.

By the way, firstly initaliaze QSPI and memory mapped mode. Then initaliaze MX_TouchGFX_Init(); .

I dont change the Textarea value

 

 

 

Forgot mention , yes does it work on simulator.

Best regards.

The MemManage_Handler can be reached when :

  • Accessing an invalid memory address.
  • Violating memory protection rules (e.g., accessing a protected region).
  • Stack overflow or underflow.
  • Unaligned memory access (depending on the processor configuration).

 

The most common cases happens because :

  • Null Pointer Dereference (attempting to access memory through a null pointer)
  • Out-of-Bounds Access (accessing an array or buffer outside its allocated bounds)
  • Uninitialized Pointers (using pointers that have not been initialized)
  • Corrupted Memory (memory corruption due to buffer overflows, incorrect pointer arithmetic, etc)
  • Incorrect Memory Mapping (accessing memory regions that are not properly mapped or protected)

In your case, I would assume the value of ID is bigger than the size of the array so you access memory outside of the array.

 

Where is this line "currentLanguageTypedText = typedTextDatabaswArray[id];" ?

You should check the typed text database throughout the execution of your program and see if it changes.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello ,

Sorry for the late reply,

Where is this line "currentLanguageTypedText = typedTextDatabaswArray[id];" ? this line inside Texts.cpp.

Actually searched many forums. And this problem was solved with the help of a Korean friend.

The problem was caused by the mpu (memory protection unit) not being configured correctly.

Thank you for your help.

Hello @alper ,

 

Were you able to solve your issue?

If not, can you check the value of "id" and what is inside typedTextDatabaswArray right before the fault?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)