Skip to content

samples: boards: nxp: s32: create sample mbox #89798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

congnguyenhuu
Copy link
Collaborator

@congnguyenhuu congnguyenhuu commented May 12, 2025

The sample supports ping-pong loopback data on a MBOX channel within one core.
The expected received data must match the sent data when running the sample.

The sample result on s32z2xxdc2/s32z270/rtu0:

   mbox_data demo started
   send (on channel 0) value: 0
   received (on channel 0) value: 0
   send (on channel 0) value: 1
   received (on channel 0) value: 1
   ...
   send (on channel 0) value: 98
   received (on channel 0) value: 98
   send (on channel 0) value: 99
   received (on channel 0) value: 99
   mbox_data demo ended

@github-actions github-actions bot added the area: Samples Samples label May 12, 2025
@github-actions github-actions bot requested review from kartben and nashif May 12, 2025 06:31
@congnguyenhuu congnguyenhuu force-pushed the enable-test-sample-mbox-for-s32z branch from 6cbc692 to c6a88c2 Compare May 12, 2025 06:52
@Dat-NguyenDuy Dat-NguyenDuy added area: mbox platform: NXP S32 NXP Semiconductors, S32 labels May 13, 2025
@congnguyenhuu
Copy link
Collaborator Author

Hello @kartben, Could you please take a look at my PR? Thanks!

@congnguyenhuu congnguyenhuu requested a review from manuargue May 21, 2025 04:19
@manuargue manuargue requested a review from Dat-NguyenDuy May 28, 2025 04:29
@manuargue
Copy link
Member

manuargue commented May 28, 2025

The hardware MRU on SoC S32Z supports ping-pong loopback data on a MBOX channel within one core.

While it's technically possible to send a message from a CPU to itself, that's not a typical or very meaningful use case -especially in the context of a sample. Mailbox peripherals like the MRU are generally intended for inter-CPU communication. This implementation feels more like an internal test case rather than functionality that should be demonstrated in a generic Zephyr sample.

The sample supports ping-pong loopback data on a MBOX channel
within one core.
The expected received data must match the sent data when running
the sample.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
@congnguyenhuu congnguyenhuu force-pushed the enable-test-sample-mbox-for-s32z branch from c6a88c2 to 4cf05d0 Compare May 29, 2025 02:12
@congnguyenhuu
Copy link
Collaborator Author

congnguyenhuu commented May 29, 2025

While it's technically possible to send a message from a CPU to itself, that's not a typical or very meaningful use case -especially in the context of a sample. Mailbox peripherals like the MRU are generally intended for inter-CPU communication. This implementation feels more like an internal test case rather than functionality that should be demonstrated in a generic Zephyr sample.

Yes, this implementation is internal and specific to the NXP S32 SoC. Therefore, I created an internal test for the NXP S32 SoC instead of doing in the generic Zephyr test.

@congnguyenhuu congnguyenhuu changed the title Enable test and sample mbox for S32Z samples: boards: nxp: s32: create sample mbox May 29, 2025
Copy link

@manuargue
Copy link
Member

manuargue commented May 29, 2025

Yes, this implementation is internal and specific to the NXP S32 SoC. Therefore, I created an internal test for the NXP S32 SoC instead of doing in the generic Zephyr test.

By internal I really meant, internal, as not on this Github repo :) I fail to see the benefit of having an NXP sample for the mailbox driver where a CPU send msgs to itself. We could have maybe two Zephyr apps exchanging msgs through the mailbox, it would make more sense.

If the mbox maintainers think this is useful, please keep it in the generic sample as you originally did. I can only advise from the NXP S32 pov.

Copy link
Collaborator

@kartben kartben left a comment

Choose a reason for hiding this comment

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

What @manuargue said, basically. It's really not clear why this new sample would be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants