473 views
in System Integration by
Hello,

I am using MQX RTOS for NXP processor i.MXRT1064 with IAR. I wants to integrate this MQX RTOS project with Embedded wizard application. I took "IMXRT1064-EVK" platform package, run a EWARM bare metal "HelloWorld" example. After that, copied "HelloWorld" example IAR project folder structure to MQX RTOS IAR project. created a new task and called EW main functions from that task. But, execution halts in EwInit() function.It also halts execution of other tasks.

while debugging I found that, Other tasks starts executing, by commenting SysTick_Config() or CycleCounterInit();,but display is not working in case.

Is this right method to integrate both projects?  what things need to be to fix this?

I appreciate your suggestion and right method to move forward. Many thanks in advance.

1 Answer

0 votes
by
Hello,

maybe that's too many steps at the same time...

Let me recommend changing the operating system from FreeRTOS to MQX RTOS first - and once that is successful you can integrate this project into your (existing) project.

Otherwise it is difficult to find out whether your application will not be executed due to incorrect project settings (e.g. too few stack) or whether your project will not work due to incorrect operating system settings (e.g. priorities, interrupts, ...).

Best regards,

Manfred.
by
Hello Satish,

Embedded Wizard needs some 1ms timer for operation. In bare metal or FREE_RTOS variant SysTick_Config() and SysTick_Handler() is used for that.
I'm not very familiar with MQX RTOS, but I can imagine, that SysTick_Config/SysTick_Handler() and maybe also the cycle counter is directly used in RTOS.
In this case, I think you have to comment these functions in ew_bsp_clock.c (as you probably already done) and to find an alternative way to call EwBspClockTickIncrement() every millisecond. Please note, that in the IMXRT1064-EVK build environment the cycle counter is used for optional CPU load measurement and also in single buffering mode.

Regards,
Martin
by
Hello Martin,

Thanks for your valuable reply.

I have commented SysTick_Config() function and created new function using MQX RTOS APIs which creates 1 msc interrupt and EwBspClockTickIncrement() is called from that interrupt.

for your information, upper layer environment is C++.

Only following debug messages printing,

Initialize Touch Driver...                   [OK]<CR><LF>
Initialize Memory Manager...                 [OK]<CR><LF>
Initialize Graphics Engine...                [OK]<CR><LF>
Create Embedded Wizard Root Ob

Can you suggest some more hints/checks. I will try with those.

Thank you,

Satish
by
Hello Manfred,

Thanks for your advice.

 I changed code at every FreeRTOS #def to MQX RTOS APIs and also changed linker file at some extend. after this, execution moved further after initialization and halted after EwBspGraphicsWaitForCompletion() function.

For, debug purpose I added preprocessor EW_USE_PXP_INTERRUPT_MODE=0 and compiled. after this, execution moved further, Displayed partial content once on the screen and executed other task too. I checked with example "BezierClock". Here, display stuck after 00:00 time with black background(No moving animation).

It seems, we need EW_USE_PXP_INTERRUPT_MODE, but I am not getting where PXP interrupt code is hampering whole RTOS system. Can you please guide me here?

Regards,

Satish.
by
Hello Satish,

I assume, that you could solve the start-up issue you described in your comment from yesterday.
Regarding EW_USE_PXP_INTERRUPT_MODE I could imagine, that interrupt priorities could be responsible for hampering the OS.

In ew_bsp_graphics.c priority 8 is set for PXP_IRQ. Can you please check which interrupt priorities are allowed with MQX RTOS?

Regards,
Martin
by
Hello Martin,

Thanks for this clue.

In MQX RTOS, priority 0 to 7 are used by interrupts and priority 8 given to main task. user task priorities  are 9 on wards.  

Higher the number means lower priority.  

 

Regards,

Satish

Embedded Wizard Website | Privacy Policy | Imprint

...