Tuesday, October 17th 2017, 1:08pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Sep 12th 2017

Posts: 1


Tuesday, September 12th 2017, 5:20pm

ucosiii with 3 task to display, only one task display unusual,

I have a stm32f767 harware, have added ucosiii and stemwin suport with my board,and i mainly create 3 task to display some message with function GUI_DispStringAt(),the third task display is a little problem,

C/C++ Source code

static voidAppTaskObj3 (void *p_arg){  OS_ERR os_err;  (void) p_arg;  static OS_MSG_SIZE msg_size;  static uint64_t hole_ic_value;                static char rstr3[64];  GUI_Init ();while (DEF_TRUE)    {      rpm_value = (int32_t *) OSQPend (&RPM_Q, 1000,      OS_OPT_PEND_BLOCKING,					&msg_size,					NULL,					&os_err);      if (os_err == OS_ERR_NONE)	{	  (*rpm_value) &= ~(3 << 30);	  hole_ic_value = (*rpm_value);	  hole_ic_value += *(rpm_value + 1);	  *rpm_value = hole_ic_value / 1000;	  sprintf ((char *) rstr3, "PWM:%dms", (int) (*rpm_value));	  GUI_DispStringAt ((const char *) rstr, 400, 400);	  printf ("task1 %s &msg_size is %d\r\n", rstr, (int) msg_size);	}      APP_TRACE_INFO(("Object test task 1 running ....\r\n"));}    }

the display is unusual ,only display after task 2 displat position.eg
in task2 ,i write code as

C/C++ Source code

GUI_DispStringAt ((const char *) rstr2, 0, 0);	    

task 3 display rstr3 message at 0,x(x==strlen(rstr2)),what's wrong maybe? 8o