Merge pull request #1576 from haukepetersen/fix_stm32f0_leds

cpu/board: fixes to stm32f0(discovery)
This commit is contained in:
Hauke Petersen 2014-08-15 10:40:35 +02:00
commit 39a198cf4b
2 changed files with 11 additions and 6 deletions

View File

@ -52,11 +52,11 @@
* @name Macros for controlling the on-board LEDs. * @name Macros for controlling the on-board LEDs.
* @{ * @{
*/ */
#define LD3_ON (LED_PORT->BSRR = LD3_PIN) #define LD3_ON (LED_PORT->BSRRL = LD3_PIN)
#define LD3_OFF (LED_PORT->BRR = LD3_PIN) #define LD3_OFF (LED_PORT->BSRRH = LD3_PIN)
#define LD3_TOGGLE (LED_PORT->ODR ^= LD3_PIN) #define LD3_TOGGLE (LED_PORT->ODR ^= LD3_PIN)
#define LD4_ON (LED_PORT->BSRR = LD4_PIN) #define LD4_ON (LED_PORT->BSRRL = LD4_PIN)
#define LD4_OFF (LED_PORT->BRR = LD4_PIN) #define LD4_OFF (LED_PORT->BSRRH = LD4_PIN)
#define LD4_TOGGLE (LED_PORT->ODR ^= LD4_PIN) #define LD4_TOGGLE (LED_PORT->ODR ^= LD4_PIN)
/* for compatibility to other boards */ /* for compatibility to other boards */

View File

@ -19,7 +19,7 @@
*/ */
#include <stdint.h> #include <stdint.h>
#include "board.h"
/** /**
* memory markers as defined in the linker script * memory markers as defined in the linker script
@ -109,7 +109,12 @@ void isr_bus_fault(void)
void isr_usage_fault(void) void isr_usage_fault(void)
{ {
while (1) {asm ("nop");} while (1) {
for (int i = 0; i < 250000; i++) {
asm ("nop");
}
LD4_TOGGLE;
}
} }
/* Cortex-M specific interrupt vectors */ /* Cortex-M specific interrupt vectors */