MaJerle / GSM_AT_commands_parser

Platform independent, ANSI C AT commands parser for SIMcom GSM modules
171 stars 95 forks source link

configASSERT( pxTCB == pxCurrentTCB ) problem #12

Open wuhuaroubj opened 6 years ago

wuhuaroubj commented 6 years ago
BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder )
{
TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder;
BaseType_t xReturn = pdFALSE;

    if( pxMutexHolder != NULL )
    {
        /* A task can only have an inherited priority if it holds the mutex.
        If the mutex is held by a task then it cannot be given from an
        interrupt, and if a mutex is given by the holding task then it must
        be the running state task. */
        configASSERT( pxTCB == pxCurrentTCB );

pxTCB : 0x20000B30 pxCurrentTCB: 0x20003738

MaJerle commented 6 years ago

What is this? Do you mind to give an explanation?

wuhuaroubj commented 6 years ago

in my project, freertos is used and GSM_RTOS set as 1 , then mutex is used.

There are 2 tasks,
void GSM_Update_Thread( void const params ) { while( 1 ) {
/
Process GSM update */ GSM_Update( &GSM ); } }

void mainTask( void const* argument ) { uint8_t ret; uint32_t i = 0, j = 0;

printf( ">>main task start\r\n" );

// gsm power control

/* Init GSM library with PIN code */
GSM_Init( &GSM, GSM_PIN, 115200, GSM_Callback );

while( 1 )
{      
  //osDelay(1000);
    /* Process callback checks */
    GSM_ProcessCallbacks( &GSM );

    if( ( gsmRes = GSM_GPRS_Attach( &GSM, GSM_APN, GSM_APN_USER, GSM_APN_PASS, 1 ) ) == gsmOK )
    {
        printf( "GPRS Attached\r\n" );
    }      
}

assert configASSERT( pxTCB == pxCurrentTCB ); happened, do you have any good idea for this problem?