Browse Source

Merge pull request #31 from BuFran/pulls/libopencm3_update

Update to the newest libopencm3
pull/36/merge
Gareth McMullin 11 years ago
parent
commit
a7fd985cfc
  1. 2
      libopencm3
  2. 2
      src/platforms/f4discovery/platform.c
  3. 2
      src/platforms/f4discovery/usbdfu.c
  4. 2
      src/platforms/native/platform.c
  5. 2
      src/platforms/native/usbdfu.c
  6. 6
      src/platforms/stlink/platform.c
  7. 2
      src/platforms/stlink/usbdfu.c
  8. 2
      src/platforms/swlink/platform.c
  9. 2
      src/platforms/swlink/usbdfu.c

2
libopencm3

@ -1 +1 @@
Subproject commit f4cd74a741084decb805d8dd15253f77f404ad24
Subproject commit a909b5ca9e18f802e3caef19e63d38861662c128

2
src/platforms/f4discovery/platform.c

@ -81,7 +81,7 @@ int platform_init(void)
LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER);
/* Setup heartbeat timer */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(168000000/(10*8)); /* Interrupt us at 10 Hz */
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
SCB_SHPR(11) |= ((14 << 4) & 0xff);

2
src/platforms/f4discovery/usbdfu.c

@ -42,7 +42,7 @@ int main(void)
/* Set up clock*/
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(2100000);
systick_interrupt_enable();

2
src/platforms/native/platform.c

@ -119,7 +119,7 @@ int platform_init(void)
}
/* Setup heartbeat timer */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000); /* Interrupt us at 10 Hz */
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
SCB_SHPR(11) |= ((14 << 4) & 0xff);

2
src/platforms/native/usbdfu.c

@ -41,7 +41,7 @@ int main(void)
dfu_protect_enable();
rcc_clock_setup_in_hse_8mhz_out_72mhz();
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000);
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN);

6
src/platforms/stlink/platform.c

@ -22,13 +22,13 @@
* implementation.
*/
#include <libopencm3/stm32/f1/rcc.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/cm3/scb.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/stm32/usart.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/stm32/f1/adc.h>
#include <libopencm3/stm32/adc.h>
#include "platform.h"
#include "jtag_scan.h"
@ -108,7 +108,7 @@ int platform_init(void)
GPIO_CNF_OUTPUT_PUSHPULL, led_idle_run);
/* Setup heartbeat timer */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000); /* Interrupt us at 10 Hz */
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
SCB_SHPR(11) |= ((14 << 4) & 0xff);

2
src/platforms/stlink/usbdfu.c

@ -95,7 +95,7 @@ int main(void)
dfu_protect_enable();
rcc_clock_setup_in_hse_8mhz_out_72mhz();
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000);
/* Handle USB disconnect/connect */

2
src/platforms/swlink/platform.c

@ -86,7 +86,7 @@ int platform_init(void)
AFIO_MAPR = data;
/* Setup heartbeat timer */
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000); /* Interrupt us at 10 Hz */
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
SCB_SHPR(11) |= ((14 << 4) & 0xff);

2
src/platforms/swlink/usbdfu.c

@ -61,7 +61,7 @@ int main(void)
dfu_protect_enable();
rcc_clock_setup_in_hse_8mhz_out_72mhz();
systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8);
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8);
systick_set_reload(900000);
/* Handle USB disconnect/connect */

Loading…
Cancel
Save