725 views
in System Integration by

Initially we developed the project without FreeRTOS and Integrated it successfully Now the situation arises to switch the project to FreeRTOS and we started to switch the project by

1. set #define EW_USE_FREE_RTOS  1

2.SInce we are using FreeRTOS we change the API for semaphores in ew_bsp_graphics.c and ew_bsp_display.c => osSemaphoreRelease to xSemaphoreGiveFromISR and osSemaphoreDef to xSemaphoreTake

After EwEndUpdate(aViewport,updateRect) method the process is halted.

EwPrintInfo

Kindly note this,

Regards

Sakthi

1 Answer

0 votes
by
Hello Sakthi,

have you seen that the original Build Environment for STM32H753-Evalboard already supports FreeRTOS by default? So the easiest ways is to use the settings and implementation as it is provided within that software package.

Can you elaborate what are the differences between your project and the provided Build Environment?

According to your description, it seems that the display update is blocking (waiting) for the next V-sync. Only one update happens, then the main loop stops.

Best regards,

Manfred.
by
Hi Manfred,

 

Ok Thanks, As per my knowledge the difference is creating a task in CMSIS as per your examples and we are creating using FreeRTOS API Is there any particular things that I need to recheck Kindly advise meantime I will crosscheck the implementation onceagain

 

Regards,

Sakthi
by

Good Morning Manfred,

 

I cant able to track the issue in my CMake Project but it in stm32CubeIDE the application is running successfully

In my CMAKE project I tested separately whether FreeRTOS is working using simple button Interrupt and its working fine.

Now in my CMAKE project I implemented the same EwInit and EwProcess in a thread I am getting HardFault Error after EwProcessSignal() Function what may be the reason for this hardfault error(Note : Project which worked fine without freeRTOS).

 

 

by
Hi Sakthi,

it's really difficult to give you good advices without seeing the whole software...

Due to the fact that the STM32CubeIDE project is running, you have a working example to compare it with your CMAKE based project.

Maybe you have different linker settings / memory locations within your projects. Or different configuration / compiler settings.

Can you analyze the hard-fault register and the call stack in case of the hard-fault?

Best regards,

Manfred.
by

Hi Manfred,

Sorry for the troubles Here is my HardFault status register values

[16:48:06:573] [Hard fault handler]␍␊

[16:48:06:573] R0 = 24000790␍␊

[16:48:06:573] R1 = ffffffe1␍␊

[16:48:06:573] R2 = 1f3a33ab␍␊

[16:48:06:573] R3 = 2c4␍␊

[16:48:06:573] R12 = 0␍␊

[16:48:06:573] LR = 24000790␍␊

[16:48:06:573] PC = f␍␊

[16:48:06:573] PSR = 8043f9b␍␊

[16:48:06:573] BFAR = 0␍␊

[16:48:06:573] CFSR = 1000000␍␊

[16:48:06:573] HFSR = 40000000␍␊

[16:48:06:573] DFSR = 0␍␊

[16:48:06:573] AFSR = 0␍␊

Thanks,

Sakthi

by
Hi Manfred,

 

Finally found the cause of this issue, In my cmake project I set the code optimization flags for c and cpp to O3 level and that leads to this HardFault Error. So I set the optmization to O2 and its working fine.

 

Thanks,

Sakthi

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...