I am hitting the following assertion in chVTDoTickI, after running for as few as several minutes:
Code: Select all
chDbgAssert(chTimeDiffX(ch.vtlist.lasttime, chVTGetSystemTimeX()) <=
chTimeDiffX(ch.vtlist.lasttime, chTimeAddX(now, delta)),
"exceeding delta");
I am running on an stm32L4 @ 80MHz, and am using the default TIM2 as the system tick timer. Here are my system timers settings:
Code: Select all
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
#define CH_CFG_ST_RESOLUTION 32
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#define CH_CFG_ST_FREQUENCY 1000000
/**
* @brief Time intervals data size.
* @note Allowed values are 16, 32 or 64 bits.
*/
#define CH_CFG_INTERVALS_SIZE 32
/**
* @brief Time types data size.
* @note Allowed values are 16 or 32 bits.
*/
#define CH_CFG_TIME_TYPES_SIZE 32
/**
* @brief Time delta constant for the tick-less mode.
* @note If this value is zero then the system uses the classic
* periodic tick. This value represents the minimum number
* of ticks that is safe to specify in a timeout directive.
* The value one is not valid, timeouts are rounded up to
* this value.
*/
#define CH_CFG_ST_TIMEDELTA 2
I have two interrupt sources (apart from system tick timer). One being an SPI dma half transfer and transfer complete interrupt occurring about every ~1msec, and a UART TX DMA interrupt occurring anywhere from every ~1ms to ~22ms .
I don't understand this cause of this assertion completely ... what could I possibly be doing to end up here? I found this previous discussion, and it seems that there were some bugs initially - but those have long since been fixed:
viewtopic.php?f=16&t=2537