Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS on Atmega2560 issues

Posted by erltot on April 30, 2016

I have also posted this in the avrfreaks forum. http://www.avrfreaks.net/comment/1871906#comment-1871906

I got an application working fine on my robot with ATmega1284p.

I have another robot build on the arduino mega, with the atmega2560 chip.

I have set up to program the arduino mega with avrdude in atmel studio.

The plan was to just change some small context switching things in the port.c file and run the same software on this robot, to make it easy to make changes on both robots with little hassle.

It was not that simple. I have tried several different port.c-files, but it seems FreeRTOS just stops working when I call vtaskdelay, it does not allow context switch.. It may or may not doing something else, I don't know since I can't use the debugger and check.

The only version of FreeRTOS I seem to get to work, is the version from this repo: https://github.com/greiman/FreeRTOS-Arduino - when I use arduino IDE. I could off course implement my c code from the atmega1284 to the arduino IDE and run it from the .ino file, but I would rather be using atmel studio for both.. I have found some other libraries for freertos and atmega2560 but these seems very bloated and I have trouble picking out what I need to make my application work..

I would really appreciate some tips on how to proceed..

Sincerely


FreeRTOS on Atmega2560 issues

Posted by rtel on April 30, 2016

when I call vtaskdelay, it does not allow context switch

Do you mean it does not swich away from the task that called vTaskDelay()? Or that the task that calls vTaskDelay() never runs again? If the latter, then the most likely issue would be that the tick interrupt is not executing. Have you checked that the setup of the timer that generates the tick interrupt is the same between the two AVR parts?


FreeRTOS on Atmega2560 issues

Posted by erltot on May 1, 2016

I can't debug using the USB bootloader, but yes, it seems like the task that calls vTaskDelay() does not run again.

I run the FreeRTOS arduino code from the arduino IDE, and my tasks are running as expected.

I use the same FreeRTOS files, in my atmel studio project, and I get this issue. Only changes I made was some arduino specific led blinking that I changed from digitalwrite to bit manipulation.


FreeRTOS on Atmega2560 issues

Posted by erltot on May 2, 2016

I could not find the source of my problems, but using these files solved it for me: https://github.com/feilipu/miniAVRfreeRTOS


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists