Skip to content

Commit 2dddedf

Browse files
committed
RPC: openamp: modify addresses and singal timings
1 parent fba55ce commit 2dddedf

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

libraries/openamp_arduino/src/mailbox_hsem_if.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ void HAL_HSEM_FreeCallback(uint32_t SemMask)
7777
UNUSED(SemMask);
7878
msg_received = RX_NEW_MSG;
7979

80-
osSignalSet(eventHandlerThreadId, 0x1);
81-
8280
#ifdef CORE_CM7
8381
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_1));
8482
#endif
8583
#ifdef CORE_CM4
8684
HAL_HSEM_ActivateNotification(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
8785
#endif
86+
87+
osSignalSet(eventHandlerThreadId, 0x1);
8888
}
8989

9090
/**

libraries/openamp_arduino/src/openamp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb)
135135
}
136136

137137
rpmsg_virtio_init_shm_pool(&shpool, (void *)VRING_BUFF_ADDRESS,
138-
(size_t)SHM_SIZE);
138+
(size_t)VRING_BUFF_SIZE);
139139
rpmsg_init_vdev(&rvdev, vdev, ns_bind_cb, shm_io, &shpool);
140140

141141

libraries/openamp_arduino/src/openamp_conf.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ extern int __OPENAMP_region_end__[];
154154
#endif
155155

156156
#define VRING_RX_ADDRESS SHM_START_ADDRESS
157-
#define VRING_TX_ADDRESS (SHM_START_ADDRESS + 0x400)
158-
#define VRING_BUFF_ADDRESS (SHM_START_ADDRESS + 0x800)
159-
#define VRING_ALIGNMENT 4
157+
#define VRING_TX_ADDRESS (SHM_START_ADDRESS + 0x1000)
158+
#define VRING_BUFF_ADDRESS (SHM_START_ADDRESS + 0x2000)
159+
#define VRING_BUFF_SIZE (SHM_SIZE - 0x2000)
160+
#define VRING_ALIGNMENT 32
160161
#define VRING_NUM_BUFFS 16 /* number of rpmsg buffers */
161162

162163
/* Fixed parameter */

0 commit comments

Comments
 (0)