Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Pelion IoT Platform
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
Nested Interrupt CM3
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
9 replies
Subscribers
127 subscribers
Views
4261 views
Users
0 members are here
Related
Nested Interrupt CM3
Offline
Nino Caruso
over 7 years ago
Note: This was originally posted on 29th May 2012 at http://forums.arm.com
Hello everyone,
i just want to know how does nesting interrupt work on Cortex M3.
Register PRIMASK, BASEPRI and FAULTMASK are usefull if i want to ignore ,when occurs, certain interrupt (by setting a priority level threshold) ignore= interrup not accepted, interrupt not nested
Register like SETENA enable or disable specific interrupt ( by # )
When the processor is handling an exception and comes an interrupt that has upper priority level, the current exception is nested (save register etc etc ) and the new exception is executed. If the priority of the new interrupt is lower , the NVIC will not nest the interrupt, it will be ignored.
is correct what i've understood? is there something that i miss?
thank you in advance
Nino
ps i'm sorry for my bad english
Offline
Nino Caruso
over 7 years ago
Note: This was originally posted on 4th June 2012 at
http://forums.arm.com
-"In such case, the pending status of this interrupt will be set"
in particular : where the pendig status is set, for an internal interrupt if the SETPEND is only for external interrupt?
similarly for register SETENA/CLRENA, how can i enable/disable internal interrupt if the registers(SETENA,CLRENA) are associated only to external interrupt?
-How can the CM3 determine the priority of an internal interrupt that is programmable if there is not a priority level register associated to it?
(ex: BUS FAULT exception #4 has a priority level programmable, where cm3 find it?)
thank you in advance
Cancel
Up
0
Down
Reply
Cancel
Offline
Nino Caruso
over 7 years ago
Note: This was originally posted on 6th June 2012 at
http://forums.arm.com
why there are 2 registers (SETENA and CLRENA) when i can enable/disable external interrupt by using one? (bit =1 external interrupt enabled , bit= 0 ext. int. disabled)
i know that writing 1 in reg CLRENA means that clear to 0 the respectively bit in the SETENA reg, but with one reg it works better
another question , how nvic schedule the pending interrupt (external or internal ) by priority?
thank you
Cancel
Up
0
Down
Reply
Cancel
Offline
Nino Caruso
over 7 years ago
Note: This was originally posted on 11th June 2012 at
http://forums.arm.com
WFI wakeup behavior :
when an interrupt arrives it's priority must be higher than "current privilege level",BASEPRI and the mask registers, than it wakeup the processor that execute the handler. Else if the interrupt will not be accepted due the priority it will not wake up the processor, in this case it will be set as pending? is there a possibility that the interrupt wakeup the processor but will be set as pending?
Similar questions for WFE wakeup behavior, is there a possibility that a event wakeup the processor but it will be set as pending? if yes,where is it set? in the register SETPEND?
thank you
Cancel
Up
0
Down
Reply
Cancel
Offline
Nino Caruso
over 7 years ago
Note: This was originally posted on 12th June 2012 at
http://forums.arm.com
Questions about WICSENSE,WICLOAD,WICMASK.
both WICMASK and WICSENSE are used to indicate that the WIC must wake up in response to the corresponding WICINT signal, but in particular WICSENSE what does it do?
WICMASK comes from the core of CM3(from NVIC) to WIC but what make me confuse is that WICSENSE comes out from the WIC to i don't know where.
How can WICLOAD is usefull(togheter WICMASK) to enable certain interrupt or event to cause a wakeup?
WIC works only when there is deep sleep, normal sleep don't causes power down to the nvic like deep sleep, right?
Thank you in advance
Cancel
Up
0
Down
Reply
Cancel
Offline
prasant behera
over 7 years ago
Note: This was originally posted on 5th June 2012 at
http://forums.arm.com
The pending status for internal exceptions are set in System Handler Control and State Register.
The priority of internal exceptions can be configured in System Handler Priority Register1, 2,3
Please go through the CM3 System Handler Priority Register1, 2, 3 and System Handler Priority Regsiter descriptions for the usage
Thanks and Regards,
Prasant
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 30th May 2012 at
http://forums.arm.com
Hi Nino,
The use of "ignore" is possibly not the best word.
If an interrupt occurred, but:
- the PRIMASK or FAULTMASK or BASEPRI is set, which result in blocking the interrupt, or
- the Cortex-M3 is already running another interrupt handler with higher or same priority
The processor will not accept the new interrupt.
In such case, the pending status of this interrupt will be set, and the processor will process it later if:
- the PRIMASK / FAULTMASK / BASEPRI is cleared, or
- the processor finished the current executing Interrupt Service Routine (ISR) and exited the handler, which result in current priority level change.
In overall, the interrupt request is not lost, but could be delayed by the interrupt masking registers or other interrupt services.
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 11th June 2012 at
http://forums.arm.com
Regarding WFI:
>else if the interrupt will not be accepted due the priority it will not wake up the processor, in this case it will be set as pending?
Yes, correct.
>is there a possibility that the interrupt wakeup the processor but will be set as pending?
Yes, by setting PRIMASK.
Regarding WFE:
> Similar questions for WFE wakeup behavior, is there a possibility that a event wakeup the processor but it will be set as pending?
Yes, using the SEVONPEND feature. By setting bit 4 of System Control Register, an event is generate for a new pending of a interrupt, which can wake up the processor from WFE sleep.
> if yes,where is it set? in the register SETPEND?
Yes, in the pending status register. You can read back the current pending status from SETPEND (NVIC->ISPR) as well as CLRPEND (NVIC->ICPR).
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 12th June 2012 at
http://forums.arm.com
Hi Nino,
I guess you are working for a company which is a ARM customer? If yes, for these RTL related question please use ARM support. (Please use your work email address so that the support team can identify you). It is inconvenient to answer this kind of questions on a public forum as some information could be confidential. Thanks.
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 8th June 2012 at
http://forums.arm.com
Hi,
It is intentional to use two addresses to set and clear the NVIC enable register.
If it use just one address for normal read and write, you need to use a read-modify-write operation to change a bit in this register. During this sequence, if a interrupt happen and the interrupt handler changed another bit in the register, when you resume the read-modify-write, you will overwrite the changes made by the interrupt handler.
The same issue can happen in system with RTOS, where context swtiching can happen in the middle of the read-modify-write, and after the task is resumed it could overwrite the changes made by another task.
By using two register addresses, you only need to have one write to enable/disable a interrupt, without the need to read back the status of the whole register beforehand.
The NVIC has a number of priority level registers for each interrupts. It compare the priority levels of pending interrupt requests against each other, as well as to the current level of the processor. This is done in hardware. If the priority level of a pending interrupt is higher than others (including the current level of the processor), it will signal to the processor core and the processor will suspend current task and start processing the interrupt request as soon as possible.
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Suggested Answer
Positioning a function in a Position Independent Executable for ARMV8
0
1437
views
3
replies
Latest
5 days ago
by
Stephen Theobald
Answered
Link a pure binary file to image with scatter file
0
1431
views
3
replies
Latest
6 days ago
by
Ronan Synnott
Answered
Failed to read contents of Internal RAM L1-I_DATA in ARM DS
0
Arm Development Studio
Cache
Debug and Trace Services Layer (DTSL)
4001
views
23
replies
Latest
19 days ago
by
Boon Khai
Suggested Answer
DS-5 connect fail when cortex-r5 is in lock-step mode
0
3680
views
10
replies
Latest
25 days ago
by
Stuart Hirons
Suggested Answer
On Cortex-M4F microcontrollers: is fixed point math faster or floating point?
0
3353
views
10
replies
Latest
26 days ago
by
Ronan Synnott
>
View all questions in Arm Development Studio forum