Merge pull request #1576 from haukepetersen/fix_stm32f0_leds
cpu/board: fixes to stm32f0(discovery)
This commit is contained in:
commit
39a198cf4b
@ -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 */
|
||||||
|
|||||||
@ -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 */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user