Skip to content
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

ipc: Call ipm_set_enabled() also for dual IPM support #37931

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

carlocaione
Copy link
Collaborator

The IPC drivers rpmsg_service and rpmsg_multi_instance are not
explicitly enabling the IPM channels when two different devices are used
for TX and RX. While this could be redundant for some IPM drivers, in
some cases the hardware needs to be enabled before using it.

Add the missing calls to ipm_set_enabled() for both the devices.

Signed-off-by: Carlo Caione [email protected]

@carlocaione
Copy link
Collaborator Author

tagging @maje-emb as well

Copy link
Member

@hubertmis hubertmis left a comment

Choose a reason for hiding this comment

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

Seems rpmsg_service sample for nRF53 stopped working after this change

@maje-emb
Copy link
Contributor

maje-emb commented Aug 25, 2021

After first testing: it seems that the ipc_service and rpmsg_multi_instance samples also stopped working. Tested on nRF5340.

@hubertmis
Copy link
Member

Fix is on the way: carlocaione#1
@carlocaione found the problem.

@carlocaione
Copy link
Collaborator Author

@hubertmis @maje-emb uhm, on a second thought I'm not convinced anymore that is the correct fix. The API documentation says indeed that .set_enabled Enable interrupts and callbacks for inbound channels https://github.com/zephyrproject-rtos/zephyr/blob/main/include/drivers/ipm.h#L205. So the correct fix here is just call set_enabled on the RX channel.

The IPC drivers rpmsg_service and rpmsg_multi_instance are not
explicitly enabling the RX IPM channel when two different devices are
used for TX and RX. While this could be redundant for some IPM drivers,
in some cases the hardware needs to be enabled before using it.

Add the missing calls to ipm_set_enabled() for both the devices.

Signed-off-by: Carlo Caione <[email protected]>
Copy link
Member

@hubertmis hubertmis left a comment

Choose a reason for hiding this comment

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

Verified rpmsg_service sample works fine on nRF5340

@maje-emb
Copy link
Contributor

ipc_service and rpmsg_multi_instance samples also work fine.

@nashif nashif merged commit 3dd7fd4 into zephyrproject-rtos:main Aug 25, 2021
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.

5 participants