Skip to content

Commit

Permalink
Upload abstraction-rtos [2106]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Dec 22, 2023
1 parent 2ae0972 commit b679710
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The this release of the RTOS Abstraction API includes support for the following:
* ThreadX

### What Changed?
#### v1.7.5
* FreeRTOS: On devices that support DeepSleep, allow the application to specify a separate latency value for DeepSleep and normal Sleep, by defining `CY_CFG_PWR_SLEEP_LATENCY`.
#### v1.7.4
* FreeRTOS: On devices that support DeepSleep-RAM, allow the application to specify a separate latency value for DeepSleep-RAM (vs. DeepSleep), by defining `CY_CFG_PWR_DEEPSLEEP_RAM_LATENCY`.
* FreeRTOS: Simplify flow for storing and restoring context during entry/exit from DeepSleep-RAM.
Expand Down
2 changes: 1 addition & 1 deletion props.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"core": {
"id": "83097955-1d6f-526e-97c4-75ce7920222f",
"name": "abstraction-rtos",
"version": "1.7.4.34550"
"version": "1.7.5.36563"
}
}
20 changes: 17 additions & 3 deletions source/COMPONENT_FREERTOS/cyabs_freertos_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ __WEAK void vApplicationSleep(TickType_t xExpectedIdleTime)
uint32_t deep_sleep_latency = cyabs_rtos_get_deepsleep_latency();
if (sleep_ms > deep_sleep_latency)
{
sleep_ms -= deep_sleep_latency;
result = cyhal_syspm_tickless_deepsleep(_lptimer, sleep_ms, &actual_sleep_ms);
result = cyhal_syspm_tickless_deepsleep(_lptimer,
(sleep_ms - deep_sleep_latency),
&actual_sleep_ms);
}
else
{
Expand All @@ -267,7 +268,20 @@ __WEAK void vApplicationSleep(TickType_t xExpectedIdleTime)
}
if (!deep_sleep)
{
result = cyhal_syspm_tickless_sleep(_lptimer, sleep_ms, &actual_sleep_ms);
uint32_t sleep_latency =
#if defined (CY_CFG_PWR_SLEEP_LATENCY)
CY_CFG_PWR_SLEEP_LATENCY +
#endif
0;
if (sleep_ms > sleep_latency)
{
result = cyhal_syspm_tickless_sleep(_lptimer, (sleep_ms - sleep_latency),
&actual_sleep_ms);
}
else
{
result = CY_RTOS_TIMEOUT;
}
}
#else // if (defined(CY_CFG_PWR_MODE_DEEPSLEEP) &&
// (CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP)) ||
Expand Down

0 comments on commit b679710

Please sign in to comment.