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:
Gregory Nutt 2018-09-21 21:32:50 -06:00
parent 6632ac721e
commit 510b0f7e07
11 changed files with 22 additions and 22 deletions

View File

@ -406,11 +406,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -347,11 +347,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -467,8 +467,8 @@ void up_irqinitialize(void)
/* Disable all interrupts */
putreg32(0, NVIC_IRQ0_31_ENABLE);
putreg32(0, NVIC_IRQ32_63_ENABLE);
putreg32(0xffffffff, NVIC_IRQ0_31_CLEAR);
putreg32(0xffffffff, NVIC_IRQ32_63_CLEAR);
/* Colorize the interrupt stack for debug purposes */

View File

@ -316,11 +316,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -378,11 +378,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -456,11 +456,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -374,11 +374,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -408,11 +408,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -433,11 +433,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -386,11 +386,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default

View File

@ -347,11 +347,11 @@ void up_irqinitialize(void)
* registers.
*/
for (i = nintlines, regaddr = NVIC_IRQ0_31_ENABLE;
for (i = nintlines, regaddr = NVIC_IRQ0_31_CLEAR;
i > 0;
i--, regaddr += 4)
{
putreg32(0, regaddr);
putreg32(0xffffffff, regaddr);
}
/* Make sure that we are using the correct vector table. The default