Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello,
I'm using the following setup:
- TMDXIDK5728.
- CCS 7.4.
- processor_sdk_rtos_am57xx_4_03_00_05.
- pdk_am57xx_1_0_10.
- ndk_2_26_00_08.
- bios_6_52_00_12.
- XDS200 external debugger.
- Running on a15_0 core only.
I have created a simple application with NDK configured by the XGCONF tools, where I used default settings for the NDK as for NIMU_BasicExample_idkAM572x_armExampleproject.
Additionally, in the application, I have created
- HW timer taken from the <ti/sysbios/family/arm/systimer/Timer.h>, configured to run at 32Khz.
- Timer routine posts a semaphore and increments a counter.
- An TI RTOS task running with highest priority of 15, which waits for the semaphore signal from the timer ISR and then increments another counter.
- Another TI RTOS task running at low priority, which kick offs the timer by making call to Timer_start(...), and then exits.
- The purpose of this low priority task is to make the high priority task block and only then start the timer.
- The NDK is running with no additional services, I'm able to get a ping from my PC.
The high priority task does not do any additional job except when the counter of the high priority task reaches some value (equivalent to 32 seconds of operation in the example), it prints out the values of the ISR counter and the task counter.
I would expect that counter incremented in ISR will have the same value as counter incremented in the high priority task, but the result is different:
the ISR counter is higher than one incremented in the high priority task. It looks like there is a glitch of tens of cycles in high priority task scheduling caused by the NDK, since
without NDK it is working fine.NDK_TestProject.zip
Am I missing something here?
Please provide an explanation of what causes this situation and what should I do to allow real time and periodic operation of my high priority tasks when NDK stack is running.
The project is attached.
Thanks, Anatoly.