2023-03-13 03:51 AM
For writing to QSPI flash, I suspend the touchgfx thread. In debugging mode, I get sometimes a hard fault. I thought it comes from switching from and to memory mapped mode of the QSPI, but now I think the problem is somewhere else.
The fault occurs always in the same function:
const touchgfx::Unicode::UnicodeChar * touchgfx::Texts::getText(TypedTextId id) const
{
return ¤tLanguagePtr[currentLanguageIndices[id]];
}
"id" has a reasonable value (1329), but if I look at the 32bit value in currentLanguageIndices[id] (points to 0x90b23954) the number is 0x94000092 which is just outside my QSPI flash size.
There was an issue with Touchgfx 4.21.1 which sounds similar, but I have installed Touchgfx 4.21.2. The hardfault only occurs in a debugging session. Any ideas?
Solved! Go to Solution.
2023-03-24 12:53 AM
Hi.
Interesting. The 'id' must be below the NUMBER_OF_TEXT_KEYS (TextKeysAndLanguages.hpp). 1329 is valid if you have a large project.
Do you get the Hardfault in that function when touchgfx is suspended? You should not.
First thing to try is to disable DCache and Prefetching (MPU) if you are running on a cortex-M7 platform.
How do you suspend TouchGFX? My preferred solution is to disable the VSYNC interrupt in TouchGFXHAL::endframe (or after ER interrupt on DSI platforms). This ensures that a complete frame was done.
Regards
2023-03-24 12:53 AM
Hi.
Interesting. The 'id' must be below the NUMBER_OF_TEXT_KEYS (TextKeysAndLanguages.hpp). 1329 is valid if you have a large project.
Do you get the Hardfault in that function when touchgfx is suspended? You should not.
First thing to try is to disable DCache and Prefetching (MPU) if you are running on a cortex-M7 platform.
How do you suspend TouchGFX? My preferred solution is to disable the VSYNC interrupt in TouchGFXHAL::endframe (or after ER interrupt on DSI platforms). This ensures that a complete frame was done.
Regards