cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin Interrupt Handling

joerg23
Associate II
Posted on March 04, 2014 at 23:02

Hello I'm running the RTos Demo for STM324xG eval and have a lot of trouble with Interrupts. For example transfer via Uart is broken. Pieces are missing. I force it in a loop when transfer starts, thats works but isn't the sense of running a RTos system. Could someone says something about Priority settings used by STemWin?  Or has someone a working Uart sample to receive and send witch is tested with STemWin and FreeRtos?

Thanks in advance

Joerg

#stemwin-freertos-priority
2 REPLIES 2
Posted on March 05, 2014 at 03:35

Not sure why the USART would fail, but you don't have to switch tasks, I'd opt to buffer the data.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
joerg23
Associate II
Posted on March 05, 2014 at 08:04

Hello,

The are buffered. Not sure thats ok as it done. The lib is not build by me.

Now I do so:

static void Background_Task(void * pvParameters)

{

/* Initilize the BSP layer */

BSP_Init();

/* Activate the use of memory device feature */

WM_SetCreateFlags(WM_CF_MEMDEV);

/* Init the STemWin GUI Library */

GUI_Init();

UB_Uart_Init();

char buf[RX_BUF_SIZE]; // puffer fuer Datenempfang

UART_RXSTATUS_t check;

/* Run the background task */

while (1)

{

/* toggle LED1..4 each 100ms */

// STM_EVAL_LEDToggle(LED1);

// check ob Daten an UART2 empfangen werden

check=UB_Uart_ReceiveString(COM3,buf);

if(check==RX_READY) {

// wenn Daten empfangen wurden

// als Echo wieder zurücksenden

UB_Uart_SendString(COM2,buf,LFCR);

}

GUI_Delay(1);

}

}

Thats works but

If I do it without the while loop it looks like :

mailto:28F5C9D0040000C9@0000 mailto:28BB90BF040000C3@6875  DHTOK@49 mailto:28F5C9D0040000C9@0000  @6875 mailto:28F5C9D0040000C9@0000 mailto:28F5C9D0040000C9@0000  @49 mailto:28F5C9D0040000C9@0000 mailto:00C3@6875  9 mailto:28F5C9D0040000C9@0000 mailto:28BB90BF040000C3@6875  DHTOK@49

________________

Attachments :

stm32_ub_uart.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzTF&d=%2Fa%2F0X0000000bMQ%2FiZziX.ta5Viga3XAnDWXBivDLIXLi3w4YpVa.jlOEjo&asPdf=false

stm32_ub_uart.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzTi&d=%2Fa%2F0X0000000bMO%2FosaZ_JO1jU28uKxYCZOGY53VQ5HKxXFs2gjzZzabRec&asPdf=false