Stack Overflow when using emWin Touchscreen libraries

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Stack Overflow when using emWin Touchscreen libraries

    Hey all - first post so thanks for being patient.

    I've been working with the emWin libraries included with Keil on my STM32F746G-Discovery board and mostly things are working well. But as soon as I include the Touchscreen pack within Keil I get a stack overflow almost immediately on startup. Keil's examples use the CMSIS-RTOS (Keil RTX) and I don't know if it's an issue there. I've tried cranking the stack sizes up with no change in behavior. When removing the Touchscreen pack my app continues to work fine.

    Any suggestions on what to look for?

    Thanks! :D
  • I finally solved it.

    The default setting from the first basic example I used leads to the stack overflow when enabling touch input:

    [RTX_Conf_CM.c]
    #define OS_TIMERSTKSZ 256 // default: was 50

    #define OS_TIMERCBQS 10 // default: was 4


    I also modified the following, which is what the full UI demo sets:
    #define OS_STKSIZE 256

    #define OS_MAINSTKSIZE 1024