Skip to content

Commit 6986cb5

Browse files
galakcarlescufi
authored andcommitted
samples: nrf53_sync_rtc: drop IPM support
Nordic platform utilizes mailbox so remove the IPM support from this sample. Signed-off-by: Kumar Gala <[email protected]>
1 parent 5a4d1f7 commit 6986cb5

File tree

7 files changed

+9
-43
lines changed

7 files changed

+9
-43
lines changed

samples/boards/nrf/nrf53_sync_rtc/boards/nrf5340dk_nrf5340_cpuapp_mbox.conf

Lines changed: 0 additions & 3 deletions
This file was deleted.

samples/boards/nrf/nrf53_sync_rtc/net/boards/nrf5340dk_nrf5340_cpunet_mbox.conf

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
CONFIG_LOG=y
22
CONFIG_NRF53_SYNC_RTC=y
3-
CONFIG_IPM_MSG_CH_2_ENABLE=y
4-
CONFIG_IPM_MSG_CH_2_RX=y
3+
CONFIG_MBOX=y
4+
CONFIG_MBOX_NRFX_IPC=y
5+
6+
CONFIG_IPM=n

samples/boards/nrf/nrf53_sync_rtc/net/sample.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ tests:
99
platform_allow: nrf5340dk_nrf5340_cpunet
1010
integration_platforms:
1111
- nrf5340dk_nrf5340_cpunet
12-
sample.boards.nrf.nrf53_sync_rtc_mbox:
13-
platform_allow: nrf5340dk_nrf5340_cpunet
14-
integration_platforms:
15-
- nrf5340dk_nrf5340_cpunet
16-
extra_args: OVERLAY_CONFIG="boards/nrf5340dk_nrf5340_cpunet_mbox.conf"

samples/boards/nrf/nrf53_sync_rtc/net/src/main.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ static void mbox_callback(const struct device *dev, uint32_t channel,
3333
sync_callback();
3434
}
3535

36-
static void ipm_callback(const struct device *ipmdev, void *user_data,
37-
uint32_t id, volatile void *data)
38-
{
39-
sync_callback();
40-
}
41-
4236
static int mbox_init(void)
4337
{
4438
const struct device *dev;
@@ -60,25 +54,12 @@ static int mbox_init(void)
6054
return mbox_set_enabled(&channel, true);
6155
}
6256

63-
static int ipm_init(void)
64-
{
65-
const struct device *ipm_dev;
66-
67-
ipm_dev = device_get_binding("IPM_2");
68-
if (ipm_dev == NULL) {
69-
return -ENODEV;
70-
}
71-
72-
ipm_register_callback(ipm_dev, ipm_callback, NULL);
73-
return ipm_set_enabled(ipm_dev, true);
74-
}
75-
7657
void main(void)
7758
{
7859
int err;
7960

80-
LOG_INF("Synchronization using %s driver", IS_ENABLED(CONFIG_MBOX) ? "mbox" : "ipm");
81-
err = IS_ENABLED(CONFIG_MBOX) ? mbox_init() : ipm_init();
61+
LOG_INF("Synchronization using mbox driver");
62+
err = mbox_init();
8263
if (err < 0) {
8364
LOG_ERR("Failed to initialize sync RTC listener (err:%d)", err);
8465
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
CONFIG_BOARD_ENABLE_CPUNET=y
22
CONFIG_LOG=y
33
CONFIG_NRF53_SYNC_RTC=y
4+
CONFIG_IPM=n
5+
CONFIG_MBOX=y
6+
CONFIG_MBOX_NRFX_IPC=y

samples/boards/nrf/nrf53_sync_rtc/sample.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@ tests:
99
platform_allow: nrf5340dk_nrf5340_cpuapp
1010
integration_platforms:
1111
- nrf5340dk_nrf5340_cpuapp
12-
sample.boards.nrf.nrf53_sync_rtc_mbox:
13-
platform_allow: nrf5340dk_nrf5340_cpuapp
14-
integration_platforms:
15-
- nrf5340dk_nrf5340_cpuapp
16-
extra_args: OVERLAY_CONFIG="boards/nrf5340dk_nrf5340_cpuapp_mbox.conf"
17-
NET_OVERLAY_CONF="boards/nrf5340dk_nrf5340_cpunet_mbox.conf"

0 commit comments

Comments
 (0)