Skip to content
This repository has been archived by the owner on Feb 10, 2018. It is now read-only.

configASSERT( pxTCB == pxCurrentTCB ) problem #12

Open
wuhuaroubj opened this issue Feb 8, 2018 · 2 comments
Open

configASSERT( pxTCB == pxCurrentTCB ) problem #12

wuhuaroubj opened this issue Feb 8, 2018 · 2 comments

Comments

@wuhuaroubj
Copy link

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
Copy link
Owner

MaJerle commented Feb 8, 2018

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

@wuhuaroubj
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants