Arm Community
Site
Search
User
Site
Search
User
Groups
Research Collaboration and Enablement
DesignStart
Education Hub
Innovation
Open Source Software and Platforms
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello Forum
Operating Systems forum
SoC Design and Simulation forum
中文社区论区
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Innovation blog
Internet of Things (IoT) blog
Operating Systems blog
Research Articles
SoC Design and Simulation blog
Tools, Software and IDEs blog
中文社区博客
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Arm Development Studio forum
Re-Entrant and nesting of low priority Interrupts on Cortex M4
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
121 subscribers
Views
4886 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Re-Entrant and nesting of low priority Interrupts on Cortex M4
Offline
Mangesh Jadhav
over 9 years ago
Note: This was originally posted on 4th December 2012 at
http://forums.arm.com
Hi All,
I have tried to implement Re-Entrant and nesting of low priority Interrupts on Cortex M4 even if NVIC does not allow this feature.
I am using Freescale's MK60FN1M0VLQ12 processor.
I am trying to implement logic such that NVIC can serve any interrupt irrespective of its priority.
For that i have implemented following logic -----
1 When interrupt occurs , NVIC pushes frame of particular registers to stack ( r0,r1,r2,r3,r12,LR,PC,XPSR - for non floating point execution ). In IRQ Handler, i have
acknowledged the interrupt and then I have pushed dummy frame to stack which contains Reset Value Of XPSR, Address of MY ISR Routine, Original LR, R12 = 0,R3 = 0,
R2 = 0, R1 =0, R0 =0. Then i have used
(BX LR)
to return from handler.
2. So when core returns from handler it will pop dummy frame and will go to MY ISR routine.
3. In MY ISR routine i have done my stuff and then load the registers r0-r4 ,r12, LR,XPSR and PC with original values from stack frame pushed by NVIC.
Now i am able to return successfully to point from where interrupt occurred. Therefore now I am able to nest low priority interrupts even if NVIC executing higher priority interrupt.But sometimes processor goes to Hard Fault Exception.
After that i have implemented same logic for floating point execution in which I have added floating point registers S0 - S15 and FPSCR. But still processor goes to hard fault exception once in a while.
So can anybody suggest what did i miss?
OR has anybody implemented the nesting of low priority interrupts on CORTEX-M core.
Basically my purpose is to serve any interrupt as soon as it occurs irrespective of its priority which can be done in
ARM7
.
Thanks !!!
Parents
Offline
Mangesh Jadhav
over 9 years ago
Note: This was originally posted on 6th December 2012 at
http://forums.arm.com
Hi Joseph ,
Thank you very much for your reply !!
Yes , What you are saying is correct but I just forgot to mention that only one interrupt is active. so no other interrupt will
pre-empt this interrupt. Also I have restored original XPSR value when returning from ISR. So do you think that it will cause the problem ?
I think the other way to nest the interrupt is to use BASEPRI. I have written a value in BASEPRI in thread mode and Handler mode. but it is not reflected in it. So Is there other way to write value in BASEPRI or we have to enable some other register to write in BASEPRI.
Regards ,
Mangesh Jadhav
Cancel
Up
0
Down
Cancel
Reply
Offline
Mangesh Jadhav
over 9 years ago
Note: This was originally posted on 6th December 2012 at
http://forums.arm.com
Hi Joseph ,
Thank you very much for your reply !!
Yes , What you are saying is correct but I just forgot to mention that only one interrupt is active. so no other interrupt will
pre-empt this interrupt. Also I have restored original XPSR value when returning from ISR. So do you think that it will cause the problem ?
I think the other way to nest the interrupt is to use BASEPRI. I have written a value in BASEPRI in thread mode and Handler mode. but it is not reflected in it. So Is there other way to write value in BASEPRI or we have to enable some other register to write in BASEPRI.
Regards ,
Mangesh Jadhav
Cancel
Up
0
Down
Cancel
Children
No data