Quality RTOS & Embedded Software

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




Loading

Free RTOS and ADC.....

Posted by *anonymous on September 22, 2013

I am working with Atmel's microcontroller AT32UC3A0512 & using software Atmel studio 6.0 My program needs to calculate ADC values and send them to a a webpage.... However, there is a command vTaskStartScheduler() that is creating a problem.... If i put this line in main() before ADC GPIO MAP, the ADC doesn't work but the webpage works fine and if i make this command the last line of my program, then the ADC works but the webpage doesn't show up in browser.... (the taskscheduler only runs idle task) I want both adc and webpage working together as i need to send adc values to webpage.... Anybody having an idea what the problem might be?? Please help me out....


Free RTOS and ADC.....

Posted by richardbarry on September 22, 2013

Unfortunately, while I have been involved in the Atmel Software Framework for SAM parts, the UC3 ports and demos are the creation of Atmel so we are not able to support them directly.

However, vTaskStartScheduler() should only touch the hardware in one place, and that is when it configures the peripheral that generates the tick interrupt. Assuming that is unrelated to either your ADC or Ethernet interrupts, then the only other thing the scheduler would do is disable interrupts before the scheduler is started and then re-enable them when the first task starts.

If the configuration of the tick interrupt is not effecting the vectors of your other interrupts, or the configuration of your other interrupts, and interrupts are indeed enabled when the first task starts....then it would point to an application error.

Regards.


Free RTOS and ADC.....

Posted by *anonymous on September 22, 2013

Thanks for the reply. Actually what i think is that tick interrupt is affecting ADC interrupt because if the webpage uploads, even then the ADC doesn't work... It seems the program gets stuck at vTaskStartScheduler() and no code beyond this line is executed.... Do you have any suggestion how to tackle this??


Free RTOS and ADC.....

Posted by richardbarry on September 22, 2013

As I'm not familiar with the port all I can suggest is that you step through the code to see what it is doing, and at what point you think it might be effecting your application.

There is no need to step through vTaskStartScheduler() itself, as that is code common to all ports, look for where vTaskStartScheduler() calls vPortStartScheduler() and step from there (or just find the function in port.c).

Regards.


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




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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

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

OpenRTOS and SafeRTOS