Skip to content

Conversation

@MuhammedZamroodh
Copy link
Collaborator

@MuhammedZamroodh MuhammedZamroodh commented Sep 22, 2025

Highlights:
- UART interrupt support
- Program memory optimisation
- Support for ztest and twister
- Context switch refignment
- Kernel and thread test cases
- Samples support
- UART: Echo bot, native tty, passthrough
- Blinky
- Philosophers
- Hello world
- Pin control driver
- New board support (sdPIC33AK512MPS512)
Fixes:
- Context switch fixes
- System timer fixes
- Build fixes

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

? 0
: (uint32_t)TMR1 / (uint32_t)TIMER1_CYCLES_PER_TICK;
ticks_elapsed =
(uint32_t)TMR1 < (uint32_t)TIMER1_CYCLES_PER_TICK
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TMR 1 should not be hardcoded as a bigger device can have multiple TMRs. Also, the 128K device has only one TMR1 that is also used as a tick timer for the RTOS but the SCCP can be configured as a Timer and used by the application. This needs to be checked.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted: We will make this driver configurable for different instances of the same IP with DTS.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can be addressed in next release

#include <zephyr/drivers/timer/system_timer.h>
#include <xc.h>

#define TIMER1_CYCLES_PER_TICK \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic and Kernel timer drivers' must be different

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarification: This is the kernel timer driver, used for kernel ticks.

Copy link
Collaborator Author

@MuhammedZamroodh MuhammedZamroodh Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A driver for generic timer will be different and needs to be implemented.
We can further take this up separately

AzharMCHP pushed a commit that referenced this pull request Oct 22, 2025
The "_too_small" test variants intentionally configure an isolated buffer
pool with only 2 buffers to validate proper error handling when the pool
is exhausted during notification of 16 msg_subscriber observers. These
tests are likely to fail on SMP systems due to a buffer recycling race
condition:

Expected behavior (uniprocessor):
  Publisher Thread:
    1. Allocate buf1 for bar_msg_sub1 ✓
    2. k_fifo_put(sub1_fifo, buf1)
    3. Allocate buf2 for bar_msg_sub2 ✓
    4. k_fifo_put(sub2_fifo, buf2)
    5. Try allocate buf3 for bar_msg_sub3 → FAIL -ENOMEM

  Subscriber threads process messages after notification completes,
  pool exhausts at subscriber #3 as expected.

SMP race condition:
  CPU 0 (Publisher):         CPU 1 (bar_msg_sub1):  CPU 2 (bar_msg_sub2):
  ------------------         ---------------------  ---------------------
  Alloc buf1 ✓
  k_fifo_put(sub1, buf1)
                             k_fifo_get() → buf1
                             zbus_sub_wait_msg()
                             net_buf_unref()
                             → buf1 FREED!
  Alloc buf2 ✓
  (reuses buf1!)
  k_fifo_put(sub2, buf2)
                                                    k_fifo_get() → buf2
                                                    net_buf_unref()
                                                    → buf2 FREED!
  Alloc buf3 ✓
  (reuses buf1 again!)
  ...continues...
  All 16 allocations succeed!

On SMP systems, subscriber threads on other CPUs may consume and free
buffers quickly enough that they are recycled back to the pool before the
publisher's notification loop can exhaust it. The test's assumption that
notification completes before subscribers run does not hold with parallel
execution.

Since this is a test design limitation (not a zbus bug), filter SMP
configurations from these specific test variants rather than attempt to
artificially slow down subscribers or change thread priorities.

Signed-off-by: Nicolas Pitre <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants