Merge pull request #31 from BuFran/pulls/libopencm3_update
Update to the newest libopencm3
This commit is contained in:
commit
a7fd985cfc
|
@ -1 +1 @@
|
||||||
Subproject commit f4cd74a741084decb805d8dd15253f77f404ad24
|
Subproject commit a909b5ca9e18f802e3caef19e63d38861662c128
|
|
@ -81,7 +81,7 @@ int platform_init(void)
|
||||||
LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER);
|
LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER);
|
||||||
|
|
||||||
/* Setup heartbeat timer */
|
/* 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 */
|
systick_set_reload(168000000/(10*8)); /* Interrupt us at 10 Hz */
|
||||||
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
||||||
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
||||||
|
|
|
@ -42,7 +42,7 @@ int main(void)
|
||||||
|
|
||||||
/* Set up clock*/
|
/* Set up clock*/
|
||||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
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_set_reload(2100000);
|
||||||
|
|
||||||
systick_interrupt_enable();
|
systick_interrupt_enable();
|
||||||
|
|
|
@ -119,7 +119,7 @@ int platform_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup heartbeat timer */
|
/* 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 */
|
systick_set_reload(900000); /* Interrupt us at 10 Hz */
|
||||||
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
||||||
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
||||||
|
|
|
@ -41,7 +41,7 @@ int main(void)
|
||||||
dfu_protect_enable();
|
dfu_protect_enable();
|
||||||
|
|
||||||
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
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);
|
systick_set_reload(900000);
|
||||||
|
|
||||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN);
|
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN);
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
* implementation.
|
* implementation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <libopencm3/stm32/f1/rcc.h>
|
#include <libopencm3/stm32/rcc.h>
|
||||||
#include <libopencm3/cm3/systick.h>
|
#include <libopencm3/cm3/systick.h>
|
||||||
#include <libopencm3/cm3/scb.h>
|
#include <libopencm3/cm3/scb.h>
|
||||||
#include <libopencm3/cm3/nvic.h>
|
#include <libopencm3/cm3/nvic.h>
|
||||||
#include <libopencm3/stm32/usart.h>
|
#include <libopencm3/stm32/usart.h>
|
||||||
#include <libopencm3/usb/usbd.h>
|
#include <libopencm3/usb/usbd.h>
|
||||||
#include <libopencm3/stm32/f1/adc.h>
|
#include <libopencm3/stm32/adc.h>
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "jtag_scan.h"
|
#include "jtag_scan.h"
|
||||||
|
@ -108,7 +108,7 @@ int platform_init(void)
|
||||||
GPIO_CNF_OUTPUT_PUSHPULL, led_idle_run);
|
GPIO_CNF_OUTPUT_PUSHPULL, led_idle_run);
|
||||||
|
|
||||||
/* Setup heartbeat timer */
|
/* 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 */
|
systick_set_reload(900000); /* Interrupt us at 10 Hz */
|
||||||
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
||||||
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
||||||
|
|
|
@ -95,7 +95,7 @@ int main(void)
|
||||||
dfu_protect_enable();
|
dfu_protect_enable();
|
||||||
|
|
||||||
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
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);
|
systick_set_reload(900000);
|
||||||
|
|
||||||
/* Handle USB disconnect/connect */
|
/* Handle USB disconnect/connect */
|
||||||
|
|
|
@ -86,7 +86,7 @@ int platform_init(void)
|
||||||
AFIO_MAPR = data;
|
AFIO_MAPR = data;
|
||||||
|
|
||||||
/* Setup heartbeat timer */
|
/* 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 */
|
systick_set_reload(900000); /* Interrupt us at 10 Hz */
|
||||||
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
SCB_SHPR(11) &= ~((15 << 4) & 0xff);
|
||||||
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
SCB_SHPR(11) |= ((14 << 4) & 0xff);
|
||||||
|
|
|
@ -61,7 +61,7 @@ int main(void)
|
||||||
dfu_protect_enable();
|
dfu_protect_enable();
|
||||||
|
|
||||||
rcc_clock_setup_in_hse_8mhz_out_72mhz();
|
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);
|
systick_set_reload(900000);
|
||||||
|
|
||||||
/* Handle USB disconnect/connect */
|
/* Handle USB disconnect/connect */
|
||||||
|
|
Loading…
Reference in New Issue