Tool/software: TI-RTOS
Hello,
My application's primary goal is to read a group of SPI sensors at a high sampling rate for a few milliseconds and make a decision on this data.
I've implemented this in a task posted by a hardware interrupt and in general my sensor read loop runs at ~15uSec per scan.
As my overall sensor read duration (10mS) is longer than my clock tick period, the clock module interrupts which adds ~35uS (every clock tick or 1mS by default)
If I set the Tick mode to 'Unnecessary time ticks will be suppressed' my application works briefly, but the MCU stops working after a short time.
-I don't see a stack overflows in HWI or TASK
-No exceptions to any HWIs
-HeapTrack didn't show any issues
Execution analysis shows that the program dives off into 'unknown'. The closest hint I've seen is a pause of the program where a semaphore count overflow looked to have happened, the semaphore counts are at 0 or 1 in ROV. Sometimes in the ROV window the BIOS tab 'Scan for errors' will show,
'Caught exception in view init code: "C:/ti/tirtos_tivac_2_16_00_08/products/uia_2_00_05_50/packages/ti/uia/loggers/LoggerStopMode.xs", line 231: Cannot read property "enabled" from null'.
How should I troubleshoot this sort of error? Sys/Bios for MSP430 processor/wiki has the most info on clock tick suppression I've found and seems to indicate that the longest a tick could be suppressed is < 1 tick duration? This issue happens in the 'empty' TI-RTOS new project if I set the clock tick mode to dynamic there as well.
Using 'Clock_tickStop();' and 'Clock_tickStart();' didn't work when I first tried, but with a reinstall of CCS they seem to do the trick now. Are there caveats to their use? Is there a limit to ticks ignored, if so is it cumulative? Should I be trying to increase my tick duration and only capture data between ticks, or am I fundamentally off in my approach in another way?
I apologize for stupid questions and other newbie mistakes, thank you for your time.
RTOS: 2.16.0.08
XDCtools: 3.32.0.06