Coarse-Grained Threading

Finally I’ve changed the threading model of the AEMB. While some instructions are still buggy and hence the demo program doesn’t run properly, I still want to use this post and the next one to explain the changes I’ve made so far. In this post I’ll explain about the design of the new threading model and how is it expected to behave. I will provide pipeline diagrams and actual waveform from the demo program running on it.  The Coarse grained model changes Read more

Modifying Critical Region on FreeRTOS

The critical region is where only one task will run on FreeRTOS and that task will continue to run until it exits the critical region. There will not be any other task running during that phase. For the older AEMB2 with only one active thread, the FreeRTOS will disable the context switching of the thread by disabling the interrupts. Since the interrupts are disabled for the active thread, no task can be switched in and the current running task will Read more

Modifying Interrupt Behaviour

AEMB has just been updated last week. The fix will prevent the tasks from breaking out of their loop. This solves the problem I faced last time where the tasks run and goes into the main function. Therefore, the new AEMB will need to be tested again to check for any more problems. Here is the new output with 2 tasks running with same priority 1. As the output shows, the tasks are both running continuously. However, as there are Read more

Interrupts on Multiple Threads

Continuing from the previous test, an in depth look is taken on the output on AEMB. The GTKWave shows that the AEMB actually stop running anything at all on one thread . This is a huge error and means that the task not only stop running, but the FreeRTOS stops as well. A further investigation found that there are two interrupts that happen concurrently. During the first interrupt, another interrupt happen before the previous interrupt ended. The dark blue line Read more

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