JN516x Mutex, Disable / Enable Interrupts

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

JN516x Mutex, Disable / Enable Interrupts

ソリューションへジャンプ
2,250件の閲覧回数
erkanermis
Contributor I

Hello,

I was using following mutex code in JN5148 in order to disable/enable interrupts. What is the JN516x equivalent of following code?

I am using Eclipse IDE and 802.15.4 stack.

Thanks for your help.

#define ENABLE_INTERRUPTS();\

{\

  register uint32 ru32CtrlReg;\

  asm volatile ("l.mfspr %0, r0, 17;" :"=r"(ru32CtrlReg) : );\

  ru32CtrlReg |= 6;\

    asm volatile ("l.mtspr r0, %0, 17;" : :"r"(ru32CtrlReg));\

}\

#define DISABLE_INTERRUPTS();\

{\

  register uint32 ru32CtrlReg;\

  asm volatile ("l.mfspr %0, r0, 17;" :"=r"(ru32CtrlReg) : );\

  ru32CtrlReg &= 0xfffffff9;\

  asm volatile ("l.mtspr r0, %0, 17;" : :"r"(ru32CtrlReg));\

}\

ラベル(3)
0 件の賞賛
返信
1 解決策
1,678件の閲覧回数
hazeman
Contributor II

This is what I use for disabling interrupts:

/// macro (undocumented but found in NXP headers) to disable interrupts

#define MICRO_DISABLE_INTERRUPTS();                                         \

        asm volatile ("b.di;" : : );

#define MICRO_ENABLE_INTERRUPTS();                                          \

        asm volatile ("b.ei;" : : );

Found this in

C:\Jennic\Components\MicroSpecific\Include\MicroSpecific.h

regards

Liam

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,678件の閲覧回数
erkanermis
Contributor I

Thank you very much

0 件の賞賛
返信
1,678件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hello!

Thank you for your interest in NXP products.

We are happy to support you through our communities, unfortunately we temporarily have a community structure with two parallel systems which has probably not guided you correctly.

Be ensured we are working on fixing the navigation and the offering as soon as we can.

In the meantime, please re-post your question into the monitored space for this product line:

https://nxpcommunity.force.com/community/CommunityForumQuestionList?category=ZigBee

You may find the following page helpful for navigating to the right spaces:

http://www.nxp.com/support/communities:COMMUNITIES

We apologize for the inconvenience,

The NXP Technical Support Team

0 件の賞賛
返信
1,679件の閲覧回数
hazeman
Contributor II

This is what I use for disabling interrupts:

/// macro (undocumented but found in NXP headers) to disable interrupts

#define MICRO_DISABLE_INTERRUPTS();                                         \

        asm volatile ("b.di;" : : );

#define MICRO_ENABLE_INTERRUPTS();                                          \

        asm volatile ("b.ei;" : : );

Found this in

C:\Jennic\Components\MicroSpecific\Include\MicroSpecific.h

regards

Liam

0 件の賞賛
返信