diff --git a/examples/stm32/f4/stm32f4-disco/lcd-serial/sdram.c b/examples/stm32/f4/stm32f4-disco/lcd-serial/sdram.c index ae8b0e2..687207f 100644 --- a/examples/stm32/f4/stm32f4-disco/lcd-serial/sdram.c +++ b/examples/stm32/f4/stm32f4-disco/lcd-serial/sdram.c @@ -67,8 +67,12 @@ sdram_init(void) { /* * First all the GPIO pins that end up as SDRAM pins */ - rcc_periph_clock_enable(RCC_GPIOB | RCC_GPIOC | RCC_GPIOD | - RCC_GPIOE | RCC_GPIOF | RCC_GPIOG); + rcc_periph_clock_enable(RCC_GPIOB); + rcc_periph_clock_enable(RCC_GPIOC); + rcc_periph_clock_enable(RCC_GPIOD); + rcc_periph_clock_enable(RCC_GPIOE); + rcc_periph_clock_enable(RCC_GPIOF); + rcc_periph_clock_enable(RCC_GPIOG); for (i = 0; i < 6; i++) { gpio_mode_setup(sdram_pins[i].gpio, GPIO_MODE_AF, GPIO_PUPD_NONE, @@ -79,7 +83,11 @@ sdram_init(void) { } /* Enable the SDRAM Controller */ +#if 1 rcc_periph_clock_enable(RCC_FSMC); +#else + rcc_peripheral_enable_clock(&RCC_AHB3ENR, RCC_AHB3ENR_FMCEN); +#endif /* Note the STM32F429-DISCO board has the ram attached to bank 2 */ /* Timing parameters computed for a 168Mhz clock */ diff --git a/examples/stm32/f4/stm32f4-disco/sdram/sdram.c b/examples/stm32/f4/stm32f4-disco/sdram/sdram.c index 6dfd332..6a46825 100644 --- a/examples/stm32/f4/stm32f4-disco/sdram/sdram.c +++ b/examples/stm32/f4/stm32f4-disco/sdram/sdram.c @@ -73,15 +73,12 @@ sdram_init(void) { /* * First all the GPIO pins that end up as SDRAM pins */ - rcc_periph_clock_enable(RCC_GPIOB | RCC_GPIOC | RCC_GPIOD | - RCC_GPIOE | RCC_GPIOF | RCC_GPIOG); -/* + rcc_periph_clock_enable(RCC_GPIOB); rcc_periph_clock_enable(RCC_GPIOC); rcc_periph_clock_enable(RCC_GPIOD); rcc_periph_clock_enable(RCC_GPIOE); rcc_periph_clock_enable(RCC_GPIOF); rcc_periph_clock_enable(RCC_GPIOG); -*/ for (i = 0; i < 6; i++) { gpio_mode_setup(sdram_pins[i].gpio, GPIO_MODE_AF, GPIO_PUPD_NONE, diff --git a/examples/stm32/f4/stm32f4-disco/spi/Makefile b/examples/stm32/f4/stm32f4-disco/spi/Makefile index 3ab004c..11d3013 100644 --- a/examples/stm32/f4/stm32f4-disco/spi/Makefile +++ b/examples/stm32/f4/stm32f4-disco/spi/Makefile @@ -1,3 +1,4 @@ +CFLAGS = -DTEST OBJS = clock.o console.o BINARY = spi-mems diff --git a/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/Makefile b/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/Makefile index bf398ef..bfcb701 100644 --- a/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/Makefile +++ b/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/Makefile @@ -17,6 +17,8 @@ ## along with this library. If not, see . ## +OBJS = console.o + BINARY = cdcacm LDSCRIPT = ../stm32f4-discovery.ld diff --git a/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/cdcacm.c b/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/cdcacm.c index 7f9496e..340855d 100644 --- a/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/cdcacm.c +++ b/examples/stm32/f4/stm32f4-discovery/usb_cdcacm/cdcacm.c @@ -23,6 +23,7 @@ #include #include #include +#include "console.h" static const struct usb_device_descriptor dev = { .bLength = USB_DT_DEVICE_SIZE, @@ -208,6 +209,7 @@ static void cdcacm_data_rx_cb(usbd_device *usbd_dev, uint8_t ep) static void cdcacm_set_config(usbd_device *usbd_dev, uint16_t wValue) { + console_puts("set config called.\n"); (void)wValue; usbd_ep_setup(usbd_dev, 0x01, USB_ENDPOINT_ATTR_BULK, 64, @@ -227,6 +229,8 @@ int main(void) usbd_device *usbd_dev; rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]); + console_setup(); + console_puts("USB demo (orig)\n"); rcc_periph_clock_enable(RCC_GPIOA); rcc_periph_clock_enable(RCC_OTGFS);