zhangyu-duck opened a new pull request, #21977:
URL: https://github.com/apache/nuttx/pull/21977
## Summary
Rework the TriCore systimer so that it works on every core and no longer
needs a minimum delay.
- Use the STM of one core as the freerun counter for all cores, so every
core gets consistent clock_systime_timespec values.
- Share code between systimer_start and systimer_start_absolute through
tricore_systimer_updata, which also applies the freerun counter offset
to relative starts.
- CMP0 raises the interrupt only when the counter equals the compare
value. Drop the minimum delay; when the compare value is already in
the past, clear the CMP0 flag and set the request bit in the SRC
register of the systimer IRQ, so the interrupt fires at once.
- Program the STM and the systimer IRQ of the core that calls
up_timer_initialize() instead of always using STM0, write OCS only when
OCDS is enabled, and add the CBS_OSTATE address of TC4xx.
- Rename tricore_stm.h to tricore_systimer.h.
## Impact
TriCore only (tc3xx and tc4xx). The systimer of each core now uses the
STM of that core. No public API change; tricore_stm.h is an internal
header and is renamed to tricore_systimer.h.
## Testing
Build: triboard_tc4x9_com:nsh and a2g-tc397-5v-tft:nsh with GCC: pass,
no warnings.
Test: TC4D9 EVB, nsh boots. nanosleep() from 1 ms to 10 s, measured with
CLOCK_MONOTONIC on the board, returns after the requested time, the same
as on the base commit. /proc/uptime advances steadily over 210 s of
periodic probes without a missed or stuck tick.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]