mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
arch/arm/src: Correct all ARMv7-M architectures. Interrupts were not be disabled correctly on power up. Writing zero to the NVIC SET-ENABLE registers has no effect. In order to disable interrupts, it is necessary to write all ones to the NVIC CLEAR-ENABLE register. Noted by David Sidrane.
This commit is contained in:
@@ -406,11 +406,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -347,11 +347,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -467,8 +467,8 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Disable all interrupts */
|
/* Disable all interrupts */
|
||||||
|
|
||||||
putreg32(0, NVIC_IRQ0_31_ENABLE);
|
putreg32(0xffffffff, NVIC_IRQ0_31_CLEAR);
|
||||||
putreg32(0, NVIC_IRQ32_63_ENABLE);
|
putreg32(0xffffffff, NVIC_IRQ32_63_CLEAR);
|
||||||
|
|
||||||
/* Colorize the interrupt stack for debug purposes */
|
/* Colorize the interrupt stack for debug purposes */
|
||||||
|
|
||||||
|
|||||||
@@ -316,11 +316,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -378,11 +378,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -456,11 +456,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -374,11 +374,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -408,11 +408,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -433,11 +433,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -386,11 +386,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
@@ -347,11 +347,11 @@ void up_irqinitialize(void)
|
|||||||
* registers.
|
* registers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
|
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
|
||||||
i > 0;
|
i > 0;
|
||||||
i--, regaddr += 4)
|
i--, regaddr += 4)
|
||||||
{
|
{
|
||||||
putreg32(0, regaddr);
|
putreg32(0xffffffff, regaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that we are using the correct vector table. The default
|
/* Make sure that we are using the correct vector table. The default
|
||||||
|
|||||||
Reference in New Issue
Block a user