cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin Demo on STM32fx9I Eval with freeRTOS

dnorwood80
Associate II
Posted on January 14, 2014 at 15:27

I recently purchased a STM32Fx9I eval board with the MB1046 display.  In the STemWin_Library_V1.1.1, there is a demo for this eval board that runs two freeRTOS tasks (one for toggling LEDs and another for the display).  For me, the LEDs toggle, but the display works for about 2 seconds and then messes up.  At first, I see the demo screen for about 2 seconds, then it starts going crazy.  Lots of colors fly across the screen at a fast rate.  

Anyway, I've looked at some the threads pertaining to some basic setup configurations, and mine are there.    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4) is my first line in main.c.  I increased the stack size and still no luck.  I'm still debugging, but it looks like somewhere after the LCD_X_Config and GUI_X_Config is where it starts

malfunctioning.  

In addition to a freeRTOS version of the demo, there is a standalone version which functions correctly - the LEDs toggle and all the demo screens cycle through without a glitch.   

I figured while I debug, I would post this thread to see if anyone experienced this problem, or perhaps anyone with some freeRTOS experience could through out some ideas.

#stm32f4 #freertos #emwin
2 REPLIES 2
dnorwood80
Associate II
Posted on January 14, 2014 at 23:59

Not sure why this fixes it, but it does. 

Within BSP_Init(), there is code to configure for Ethernet:

BSP_Init()

{

...

#ifdef USE_MB1046

  /* Initialize the Ethernet BSP */

  ETH_BSP_Config();

#endif

...

}

If I take this piece out and add it after GUI_Init() (in one of the two tasks running) returns (plus some delay), it seems to work.  

Again, still not sure why this works, but now the demo scrolls through each page.  Next will be ensuring lwIP works.   

dnorwood80
Associate II
Posted on January 16, 2014 at 16:00

Nevermind, that did not fix the problem.  I didn't see where I inadvertently placed ETH_BSP_Config() in the while loop of my background task.  Anyway, I think I'm more confused why this allows the display to cycle through correctly. 

Looks like I'm the only contributor thus far.  I suppose this thread can be a notebook for my development woes :)  I'll keep in going until it's fixed, or someone tags along for a ride.