Enabling/Disabling Interrupts

Regarding my previous post on the interrupt crashing the FreeRTOS tasks, I went and research on the method used for enabling and disabling interrupts on AEMB through software. There are two simple functions used to do the job, which are portDISABLE_INTERRUPTS() and portENABLE_INTERRUPTS(). These two functions will disable and enable the interrupts. These are implemented in the task itself. void vTestTask1(void *pvParameters) { while (1) { portDISABLE_INTERRUPTS(); iprintf(“task 1”); portENABLE_INTERRUPTS(); } } and void vTestTask1(void *pvParameters) { while (1) { Read more

Interrupt Behaviour

I would like to look deeper into the application of FreeRTOS interrupts on the latest version of AEMB. It is important to be able to clearly identify the context switching by the interrupt on both threads of AEMB. To look more into the interrupts, the tasks are written with longer assembly code. This will give an idea on where task stop and continue or restart all over again. The program is tested with task 1 (priority 0) and idle task. Read more

Different Priorities

The task priority of FreeRTOS is tested on the new AEMB processor. The previous programs tested all contains tasks of equal priorities with the idle task. Therefore, higher priority tasks are to be tested to see their effect on the new AEMB processor. Will the higher priority tasks act independent of the idle task, or will they run together with the idle task? Each program are run with the presence of the infinite loop. Task 1 (priority 1) and idle Read more

AEMB FreeRTOS Two Threads Testing

This week, I set my mind on understanding on the switching of tasks inside FreeRTOS on the latest AEMB with two threads. From previous week, it was found that there was an infinite loop which act upon the second thread while the first thread will continue with FreeRTOS and all the tasks for the older AEMB. So, for the newer AEMB with interrupts enabled for both threads, this loop might show some effects. For this time’s experiments, each will be Read more

Swarm Simulations, Quadcopter Design

This week the focus was given on trying to develop a simple simulation to test out one of the algorithms discussed the previous week. The algorithm used to try out the simulation was the Uniform Dispersion algorithm. Some work was also done in the aspect of a proposed design for the quad copter considering that newly assembled ones could be used in the event the hacking of the toys isn’t as successful. The development of a demo for multi-agent communication Read more

AEMB Multithread Dissection

This week main project is to port FreeRTOS to the newer AEMB. In the previous weeks, the AEMB processor only fully utilizes one thread. It was the older version and the newer version actually fully utilizes two threads. I was instructed to make the necessary changes so that FreeRTOS will work on both of the two threads. First of all, what are the main differences between the old AEMB and new AEMB? The main difference is the interrupts. On the Read more

Creating the Task class

FreeRTOS was created using C. C++ offers something more than C, which are object oriented and inheritance. This is shown by the usage of class. By using class, users can create their task by simply creating the object of the class. To implement the class, I need to understand the definition of class and its properties. Class is like data structure, except that it can contain functions. So, each object created from a class will not only has the same Read more

[Revisit] Upgrading FreeRTOSV8.0.1

As it turns out, there was some redundant things that I did during the upgrade to FreeRTOSV8.0.1 for AEMB2. What I did wrong last time was that I added the commits from upstream into the git repository. This was actually not required as the commits from upstream can be viewed by checking them out in the upstream itself. Since the commits were added, the git history for AEMB2 repository became extremely long and had more than 700 commits which took Read more

Integrating FreeRTOS with C++

FreeRTOS has been using C language as its base programming language ever since it started. So, we decided to try using C++ with FreeRTOS. One of the advantages which C++ provides to FreeRTOS is the usage of class. By using class, users can supposedly create task with less syntax and coding lines. First of all, a class.hpp header file is to be created which will contain the class information of the task creation class. This is to separate the class Read more

Swarm robotic algorithms, more hacking and a new quad copter

This past week was a great struggle to try to get the quad copter to talk back to the Arduino. As discussed last week, the Arduino library DZL was tested with the NRF24L01 but the quad copter could not bind with the Arduino, or rather with the communication protocol set up with the Arduino. So a few debugging techniques were applied to the library to find out exactly how it works and where the binding process fails. Adding to that, Read more