已回答假定已回答

在VendorDemoBF609例程中添加MAPI运行出错

305335169@qq.com 在 2016-7-16 詢問的問題
最後回覆由hpkamen於2016-7-18提供

大家好!

 

   我在B609开发板使用CCES2.1.0上debug  uCUSBD_Class_Vendor-Rel2.1.0例程(core0),在该例程中添加MAPI功能,

core0 运行到 函数 “remote_endpoint = mcapi_endpoint_get(DOMAIN, remoteNode,  port, MCAPI_TIMEOUT_INFINITE, &status);”是总是出现下面的报错。core1运行正常。

A non-recoverable error or exception has occurred.

  Description:   Attempted misaligned data memory or data cache access (Exception with EXCAUSE=0x24).

  General Type:  UnhandledException

  Specific Type: DataMisalignedAccessViolation

  Error PC:      0xffa03128

 

core0 的代码如下:

int  main (void)

{

    OS_ERR  err;

    struct DSP_MSG msg;

    /* Initialize board specific settings */

    BSP_Init();

    /* Initialize managed drivers and/or services */

    adi_initComponents();

    adi_core_enable(ADI_CORE_1);   //enable core 1

    if (!initialize_comms(NODE_CORE_1, PORT_COMMS))

      return 1;

    msg.buffSize = sizeof(msg.buffer);

    My_init_data(msg.buffer, msg.buffSize);

    if (!perform_dsp_function(&msg))

        return 1;

    /*

     * Initialize memory pool (see "Memory allocator heap size" on uC/LIB tab to

     * adjust amount of memory set aside for the pool.

    */

  Mem_Init();

/*

* ===============================================================================

* When uC/OS-III(TM) Real Time Kernel for CrossCore(R) Embedded is added to this

* application, define ADI_USE_UCOS3_SOURCE as the call to OSInit() will defer

* to adi_OS_Init() called from adi_initComponents()

*/

#ifndef ADI_USE_UCOS3_SOURCE

    OSInit(&err);   /* Init uC/OS-III.                                      */

#if defined(__ADSPARM__) && (1 == __ADSPCORTEXA5__)

  OSGPTimerInit(ADI_CFG_CORE_TMR_COUNT);

#endif

#endif

#if defined(__ADSPSC589_FAMILY__)

  /* System protection unit configuration to give acces */

  *pREG_SPU0_SECUREP153 = 0x03;

  *pREG_SPU0_SECUREP154 = 0x03;

#endif

    /* create a semaphore required for USBIO operation */

    OSSemCreate (&SemUSBIO,

                  "Sem Usb",

                  0,

                  &err);

    App_ObjCreate();

  /* Create the application task */

    App_TaskCreate();

    /* Start multitasking (i.e. give control to uC/OS-III).  */

   OSStart(&err);

    return (0);

}

core0  的system.svc 已经添加MAPI插件。

不知道这种异常时如何导致的?

結果