Message buffer AMP issue MPC5777C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Message buffer AMP issue MPC5777C

427 次查看
Othmane1
Contributor II

Hi,

i'm trying to create a message buffer between two tasks one is on core0 of the MPC5777C and the other one on the other core, the first task basically will send to the buffer and the other task will receive from the buffer.

when i do the implementation it works fine but only while debugging, but at runtime it doesn't work, i tried to attach to running reset to see why it stops and it seems it stops in one of the memset functions (that function is called from the function prvInitialiseNewStreamBuffer which in turns is called from the 

xStreamBufferGenericCreateStatic function)

 

static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
                                          uint8_t * const pucBuffer,
                                          size_t xBufferSizeBytes,
                                          size_t xTriggerLevelBytes,
                                          uint8_t ucFlags )
{
    /* Assert here is deliberately writing to the entire buffer to ensure it can
     * be written to without generating exceptions, and is setting the buffer to a
     * known value to assist in development/debugging. */
    #if ( configASSERT_DEFINED == 1 )
        {
            /* The value written just has to be identifiable when looking at the
             * memory.  Don't use 0xA5 as that is the stack fill value and could
             * result in confusion as to what is actually being observed. */
            const BaseType_t xWriteValue = 0x55;
            configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer );
        } /*lint !e529 !e438 xWriteValue is only used if configASSERT() is defined. */
    #endif

    ( void ) memset( ( void * ) pxStreamBuffer, 0x00, sizeof( StreamBuffer_t ) ); /*lint !e9087 memset() requires void *. */
    pxStreamBuffer->pucBuffer = pucBuffer;
    pxStreamBuffer->xLength = xBufferSizeBytes;
    pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes;
    pxStreamBuffer->ucFlags = ucFlags;
}
0 项奖励
回复
1 回复

390 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Is this question related to any of NXP product? I think it is rather some general application programming question, I am afraid in such case we could not help. If it is related to NXP driver, please specify. Thanks

0 项奖励
回复