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));\
}\
Solved! Go to Solution.
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
Thank you very much
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
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