I am trying to use freetos on mega128. But the application is not working as it should. I have declared two tasks while toggle buzzer and led at an interval of 1 sec. But only led are toggling ( only the task declared in last works). If I use vTaskDelay or vTaskDelayUntil then the system hangs. Changes I have made :- 1) In make file change from mega323 to mega128 Mega128 is running on 8MHz internal RC osc.
I would say it sounds like the tick interrupt was not firing, but you say the LED toggle is working? Is the period of the LED toggle correct? Does a 128 and 323 have the same timers?
What can be the case that vTaskDelay or vTaskDelayUntil causes system to hang. #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 8000000 ) #define configTICK_RATE_HZ ( ( portTickType ) 1000 ) #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 ) #define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 85 ) #define configTOTAL_HEAP_SIZE ( (size_t ) ( 2500 ) ) #define configMAX_TASK_NAME_LEN ( 8 ) #define configUSE_TRACE_FACILITY 0 #define configUSE_16_BIT_TICKS 1 #define configIDLE_SHOULD_YIELD 1 these are the settings used for avr mega128 main.c:94: warning: pointer targets in passing argument 2 of ‘xTaskCreate’ diffe r in signedness main.c:95: warning: pointer targets in passing argument 2 of ‘xTaskCreate’ diffe r in signedness these errors are coming while compiling
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.