While opening a GPIO device is assigning initial pin require


While opening a GPIO device, is assigning initial pin required? if not, what can be done afterwards 10 add a pin? How the LWGPIO program is different from standard GPIO program. Explain? bullet if one task is created inside of other one as its last mission .What happen to main task while newly created tasks running? When does it end? What is the task priority? How It affects the program execution? What is MQX? Why do we need operating system? what is the difference between operating system and Real Time operating system(RTOS)? What do you define in the TASK_ TEMPLATE_ STRUCT? What are the parameters for creating a task? What is the purpose of FILE_ PTR Explain. only one out of the four LEDs needs to be turned ON/OFF. How is this task accomplished by modifying GPIO_PIN_ STRUCT Replace MQX_ AUTO_ START_ TASK with 0. what will happen to the program output? will the program execute?

Solution

What is task priority ? How it effects the program execution?

Each task have priority range from 0 to configMAX_PRIORITIES - 1 . Task priorities is define in FreeRTOSConfig.h header file. Task priority is use for execution of program , which program will run first or next. We can arrange the schedule for processes.

Low priority tasks is assigned by low priority numbers. The zero priority task is called idle task (tskIDLE_PRIORITY).

Tasks is in the Ready or Running state will decide by FreeRTOS scheduler. Lower priority tasks that are always in the ready state and highest priority tasks always in running . Same priority can be assigned to any number of tasks .

Ready state tasks of equal priority when configUSE_TIME_SLICING is not defined, or if configUSE_TIME_SLICING is set to 1, then using a time sliced round robin scheduling scheme will share the available processing time.

What is MQX ? why we do need operating system ?

MQX is a real time operating system. MQX is standing for Message Queue eXecutive.

MQX is mostly using in embedded systems or embedded based application. MQX development is done on machine running Unix or Windows. Using cross-compiling software we can run on different – different CPU architectures.

MQX includes a following technique to manage resources

In MQX kernel, interrupts, semaphores, queues and a memory manager are taking some memory space as little as 6 KB of ROM .

MQX having some tools to manage resources :

i). TCP/IP stack        ii) embedded MS-DOS file system iii) USB Host/Device Stack

iv) Task-Aware debugging v) Remote debugging and performance analysis tools.

MQX is portable operating system so we can use for any platforms and runs on any modern CPU ( Kinetis, PowerPC, ARC, ARM, xScale).

Why do we need operating system ?

If we are not using operating system then all of code we have write ourselves. OS is use for resource management, device drivers , file systems and threads. OS provide the better communication between user and hardware. Its managing the memory and hardware. Its provide the multitasking, multiprogramming and faster implementation of any task or problems .

____________________________________________________________________________________

What is different between operating system and RTOS ?

                                        OS

                                  RTOS

What do you define in TASK_TEMPLATE_STRUCT ? what are parameters for creating a task?

TASK_TEMPLATE_STRUCT is a list of task templates. When we are create tasks on the processor then we will use to define set of templates. For example MQX RTOS creates one instance of each task, whose template defines it as an autostart task.

Running application can create other tasks using a task template which is defines in template list or application defines dynamically. The end of the task template list is a zero-filled task template.

following attributes to a task can assign :

• Autostart - when OS starts, it creates one instance of the task.

• DSP – OS saves the DSP co-processor registers.

• Floating point – OS saves floating-point registers.

• Time slice – OS uses round robin scheduling for the task.

For example:

TASK_TEMPLATE_STRUCT OS_Template_List[] =

{

{ MAIN_TASK, Program_task, 0x3300, 10, \"Program_task\",MQX_AUTO_START_TASK, 0L, 0},

{ WORLD, world_task, 0x3000, 4, \"world_task\", MQX_TIME_SLICE_TASK, 0L, 100},

{ FLOAT, float_task, 0x4000, 3, \"Float_task\",OS_AUTO_START_TASK | OS_FLOATING_POINT_TASK, 0L, 0},

{ 0, 0, 0, 0, 0, 0, 0L, 0 }

};

                                        OS

  1. Non-Deterministic and Non-time critical OS.
  2. In some cases non-predicable.
  3. Task scheduling is not priority based always cause it manages to achieve high performance.
  4. Its large size OS.
  5. In this completely fair scheduling(CFS) method.
  6. Unbounded latency .
  7. Virtual memory is present.
  8. Linux (Ubuntu, redhat, centos) windows.

                                  RTOS

  1. Deterministic and time critical OS.
  2. Predicable and quick response.
  3. Task scheduling is priority based always.
  4. Its small size OS.
  5. Scheduling method is preemptive task scheduling method.
  6. Bounded latency (process will get execution within a define time).
  7. No virtual memory , directly interact with physical memory.
  8. Eg. RTlinux, FreeRTOs.
 While opening a GPIO device, is assigning initial pin required? if not, what can be done afterwards 10 add a pin? How the LWGPIO program is different from stan
 While opening a GPIO device, is assigning initial pin required? if not, what can be done afterwards 10 add a pin? How the LWGPIO program is different from stan

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site