cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G-DISCO, TouchGFX 4.13.0, STMCubeIDE 1.3.0, FreeRTOS

AD�?b
Senior

Hi!

How to set FreeRTOS for 2 tasks and queue 2?

How to add support in main.c and Model.cpp?

Andrzej

20 REPLIES 20

Several times my program hung up. Can this cause external interrupts?

I work with FreeRTOS.

Karan 123
Senior

No. External Interrupts works well .

These should work ..

Please check attach working file and ISR Routine ..

extern osMessageQId messageQ ;
 
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
	uint8_t msg = 1;
	if(GPIO_Pin == GPIO_PIN_11)
	{
		if(uxQueueMessagesWaitingFromISR( messageQ ) == 0)
		{
			// Non-ISR versions of FreeRTOS methods used to put tasks into states.
			// This is an interrupt handler. Queues are much busier when used from a task.
			// Cannot block on a queue from ISR. Scheduler queues tasks blocked on same queue in prio order.
			//
			// This method clears the interrupt every time, so we're only sending signals
			// to the gui every time we press the button.
 
			HAL_GPIO_TogglePin(LED_GPIO_Port , LED_Pin) ;
			xQueueSendFromISR(messageQ, &msg, 0 );
		}
 
 
	}
	while(HAL_GPIO_ReadPin(GPIOI, GPIO_PIN_11) != GPIO_PIN_RESET);//Blue pushbutton – PI11
}

--

Karan

Thanks!

AD�?b
Senior

Hi!

I have this error in Screen1View.cpp

expected unqualified-id before '-> ' token

Why?

Karan 123
Senior

Hi,

Please change

Presenter->askForNextNumber();

to

presenter->askForNextNumber();

then yet . It should work.

--

Karan

Hello

Thank you. OK.

Andrzej

AD�?b
Senior

Hi!

How to send the number set on the screen to UI?

How to send to View from Model?

Andrzej

You mean array.

Hi!

STM32F746G-DISCO. I attach the program. With Model to UI it works correctly. I don't know how to send "unsigned int time" from View to Presenter and from Presenter to Model?

Andrzej