Interrupt in freertos_i2c

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interrupt in freertos_i2c

ソリューションへジャンプ
1,375件の閲覧回数
davidzhu
Contributor III

Hello,

I am testing freertos_i2c_frdmk66f demo project.

I found master task has a higher priority than slave task

/*******************************************************************************
* Definitions
******************************************************************************/


/* Task priorities. */
#define slave_task_PRIORITY (configMAX_PRIORITIES - 1)
#define master_task_PRIORITY (configMAX_PRIORITIES - 2)

But slave IRQ has a higher priority than master irq.

I don't understand this, could someone please can explain it?

0 件の賞賛
返信
1 解決策
1,238件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

Please be noted that ISR has higher priority over the tasks.

A task is a software feature that is unrelated to the hardware on which FreeRTOS is running. The priority of a task is assigned in software by the application writer, and scheduler decides which task will be in the running state.

An interrupt service is a hardware feature because hardware controls which interrupt routine will run. Tasks will only run when there are no ISRs running. So the lowest priority interrupt will interrupt the highest priority task.

For FreeRTOS task priority, the bigger the number, the lower is the priority.

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,239件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi

Please be noted that ISR has higher priority over the tasks.

A task is a software feature that is unrelated to the hardware on which FreeRTOS is running. The priority of a task is assigned in software by the application writer, and scheduler decides which task will be in the running state.

An interrupt service is a hardware feature because hardware controls which interrupt routine will run. Tasks will only run when there are no ISRs running. So the lowest priority interrupt will interrupt the highest priority task.

For FreeRTOS task priority, the bigger the number, the lower is the priority.

Regards

Daniel

0 件の賞賛
返信