AnsweredAssumed Answered

MCAPI SC589 async

Question asked by tcmichals on Jul 28, 2016
Latest reply on Aug 12, 2016 by tcmichals

Attached is example code testing MCAPI API:

  •   synchronous API mcapi_msg_recv (ARM) mcapi_msg_send SHARC)
    • This works
  • synchronous (ARM) and asynchronous SHARC (works)
    • async: mcapi_msg_recv_i and mcapi_wait_any (ARM)
    • sync: mcapi_msg_send (SHARC)
  • synchronous (SHARC) and asynchronous ARM (works)
    • async: mcapi_msg_send_i and mcapi_wait_any (SHARC)
    • sync: mcapi_msg_recv (ARM)
  • asynchronous (ARM) and asynchronous SHARC (Fails)
    • async: mcapi_msg_send_i and mcapi_wait_any (SHARC)
    • async: mcapi_msg_send_i and mcapi_wait_any (ARM)

 

Product version: 2.3.0.0

IDE Version: 2.3.51

 

The correct settings in the app code cause a fault on the ARM.  Here's the output:

 

Loading application: "C:\Analog Devices\CrossCore Embedded Studio 2.3.0\SHARC\ldr\ezkitSC589_preload_core0_v01"

Load complete.

Loading application: "C:\Users\tcmichals\cces\2.3.0\testMCAPINoRTOS_Core0\Debug\testMCAPINoRTOS_Core0"

Load complete.

Loading application: "C:\Users\tcmichals\cces\2.3.0\testMCAPINoRTOS_Core1\Debug\testMCAPINoRTOS_Core1.dxe"

Load complete.

SHARC running..

(ARM) running..

(SHARC) waitOnAnyThing

(SHARC) sndMsgNonBlocking 120 (msg sent)

(SHARC) waitOnAnyThing 149 (MCAPI_SUCCESS index=1 mcapi_status 1)

(SHARC) sndMsgNonBlocking 120 (msg sent)

(SHARC) waitOnAnyThing 149 (MCAPI_SUCCESS index=1 mcapi_status 1)

(SHARC) sndMsgNonBlocking 120 (msg sent)

(SHARC) waitOnAnyThing 149 (MCAPI_SUCCESS index=1 mcapi_status 1)

(SHARC) sndMsgNonBlocking 120 (msg sent)

(SHARC) waitOnAnyThing 149 (MCAPI_SUCCESS index=1 mcapi_status 1)

(ARM) waitOnAnyThing

(SHARC) sndMsgNonBlocking 120 (msg sent)

(ARM) getMsgNonBlocking 104 (wait on msg 2)

(ARM) waitOnAnyThing 159 (MCAPI_NULL default index 1 mcapi_status 0) <-- Notice this message, the return code is 1, but the status is 0

(SHARC) waitOnAnyThing 149 (MCAPI_SUCCESS index=1 mcapi_status 1)

 

A non-recoverable error or exception has occurred.

  Description:   No dispatched handler available for the specified interrupt code.

  General Type:  RunTimeError

  Specific Type: NoDispatchedHandler

  Error PC:      0xc100457c

(SHARC) sndMsgNonBlocking 120 (msg sent)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 0 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

(SHARC) waitOnAnyThing 186 (MCAPI_NULL default index 20 mcapi_status 0)

 

In each module (ARM)(SHARC) there is a variable to control mixing async to sync.

 

int _loop = 5;

 

If _loop is equal, in each module, the same number of sync commands are executed.

Tests:

  1. _loop = 10 in each module (main.c), works
  2. _loop =5 (ARM/main.c) _loop = 10 in (SHARC/main.c) it fails after the 10 loops

The goal is to be able to test sync to sync, async to sync, sync to async and async to async.

When the loop counters both expire, that is when the fault occurs.

 

Is the code correct?

Attachments

Outcomes