Free RTOS and ADC…..

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…..

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…..

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…..

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.