I'm using this example :
https://github.com/PierrickRauby/PRU-RPMsg-Setup-BeagleBoneBlack/blob/master/Codes/Test_RPMsg/PRU_codes/PRU_RPMsg_Echo_Interrupt1/main.c
Also i have added some changes :
void main(void)
{
struct pru_rpmsg_transport transport;
uint16_t src, dst, len;
volatile uint8_t *status;
/* Allow OCP master port access by the PRU so the PRU can read external
memories */
CT_CFG.SYSCFG_bit.STANDBY_INIT = 0;
/* Clear the status of the PRU-ICSS system event that the ARM will use to
'kick' us */
CT_INTC.SICR_bit.STS_CLR_IDX = FROM_ARM_HOST;
/* Make sure the Linux drivers are ready for RPMsg communication */
status = &resourceTable.rpmsg_vdev.status;
while (!(*status & VIRTIO_CONFIG_S_DRIVER_OK));
/* Initialize the RPMsg transport structure */
pru_rpmsg_init(&transport, &resourceTable.rpmsg_vring0,
&resourceTable.rpmsg_vring1, TO_ARM_HOST, FROM_ARM_HOST);
/* Create the RPMsg channel between the PRU and ARM user space using the
transport structure. */
while (pru_rpmsg_channel(RPMSG_NS_CREATE, &transport, CHAN_NAME, CHAN_DESC,
CHAN_PORT) != PRU_RPMSG_SUCCESS);
while (1) {
if (__R31 & HOST_INT) {
/* Clear the event status */
CT_INTC.SICR_bit.STS_CLR_IDX = FROM_ARM_HOST;
/* Receive all available messages, multiple messages can be sent per kick */
while (pru_rpmsg_receive(&transport, &src, &dst, payload, &len) ==
PRU_RPMSG_SUCCESS) {
while (__R31 & (1 << Start_signal)) {
if (__R31 & (1 << Main_signal)) {
strcpy((char *)payload, "I GOT 1");
pru_rpmsg_send(&transport, dst, src, payload, 7);
}
else {
strcpy((char *)payload, "I GOT 0");
pru_rpmsg_send(&transport, dst, src, payload, 7);
}
__R31=0x0;
}
pru_rpmsg_send(&transport, dst, src, "No Transition", 12);
}
}
}
}
After the program execution had ended i had tried to stop PRU and the next
error appeared:
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.569884] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.678319] Process irq/155-remotep (pid: 2939, stack limit =
0xdc14e
218)
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.685138] Stack: (0xdc14fe08 to 0xdc150000)
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.689518] fe00: dc915600 dc14fe7c 00000381
000000
01 dc14fe44 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.697736] fe20: dc915600 daba1b84 db3f6180 daba1b8c 0001ba6a
db3f61
c4 dc14febc dc14fe48
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.705952] fe40: bf17c08c c08577fc 014000c0 dc14fe58 c016d074
c0dab9
00 db630000 c1504dc8
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.714170] fe60: bf17d6c4 bf17d488 bf17d6b0 bf17d678 daa7d400
daa7d8
38 00000200 dfd656f6
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.722386] fe80: 00000600 00000381 00000000 322c3fc6 dc14ff0c
daa7d4
00 00000000 daba1664
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.730604] fea0: 00000001 dc6ee200 daba1640 c01acfc0 dc14fed4
dc14fe
c0 c0856cec bf17bfe0
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.738822] fec0: db3b5800 00000000 dc14feec dc14fed8 c0b8b7e0
c0856c
a8 db3b5a58 dc6ee200
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.747039] fee0: dc14ff04 dc14fef0 bf02c760 c0b8b7a4 daba1640
dc6ee2
00 dc14ff24 dc14ff08
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.755256] ff00: c01acfec bf02c744 dc14e000 00000000 daba1664
000000
01 dc14ff74 dc14ff28
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.763472] ff20: c01ad34c c01acfcc 00000004 c15f1440 dc14ff5c
c1504d
c8 00000000 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.771690] ff40: c01ad0f8 322c3fc6 daba135c daba1340 00000000
daba18
00 dc14e000 daba1640
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.779906] ff60: daba135c db23fd04 dc14ffac dc14ff78 c0163e20
c01ad1
e8 00000000 c01ad1dc
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.788123] ff80: 00000000 daba1800 c0163cdc 00000000 00000000
000000
00 00000000 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.796340] ffa0: 00000000 dc14ffb0 c0108fe8 c0163ce8 00000000
000000
00 00000000 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.804556] ffc0: 00000000 00000000 00000000 00000000 00000000
000000
00 00000000 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.812773] ffe0: 00000000 00000000 00000000 00000000 00000013
000000
00 00000000 00000000
Message from syslogd@beaglebone at Aug 30 20:59:26 ...
kernel:[ 885.891844] Code: e50b303c e1a0a001 e50b2030 0a00009e (e5d05031)
I tried to change readbuf size and size's of virtqueues , but it didn't
help. Does anyone have any idea what the problem here is? Thanks.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/28bb9d91-a2da-4257-a9f2-503dd97d89ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.