Other Parts Discussed in Thread: EK-TM4C1294XL
Hi,
I am doing one POC for task switching using TI-RTOS. Following are functionalities I want to implement:
- A timer will be running at every 10 Sec.
- Whenever timer expires, read the data from GPIO pin
- 1st task: If network is available than try to send this GPIO pin data to Remote server.
- 2nd Task: If network is available and there is some data inside SD card than send this data to Remote server.
- 3rd Task, if data sending failed or network is not available than save this to SD card
- Network TCP/IP hook to know whether board is assigned IP address or not. If IP address is not there than timer will call 3rd task directly.
- All Communication with Remote server should be secure.
As a starting point I am referring httpsget_TivaTM4C1294NCPDT example.
I created two static tasks with Priority as -1. In timer function I am changing priority of 1st task to 1. Inside 1st Task routine, I created 2nd task dynamically and changed the priority of task 1 again to -1. Inside 2nd task routine changed the priority to -1 for 2nd task.
Timer is running at every 10 seconds as expected but 1st and 2nd tasks are executed once. Also sequence is Timer->Task1->Timer->Task2->Timer->Timer.... instead of Timer->Task1->Task2->Timer-Task1->Task2.....
Any reason for this? And any thoughts to achieve above functionalities?
Using EK-TM4C1294XL board, CCS v6.1.0.00104 , tirtos_tivac_2_12_01_33, TivaWare_C_Series-2.1.1.71 on Windows 8 64-bit machine.
Thanks,
Bhavesh