i am making my first experiments with STM32duino.
Up to know i could find not an thread that answer the following questions:
I want to try to use the USB interface of the STM32 blue pill as serial device.
Programming is working with an PL2303 over the UART1 and i can receive data there.
But i want to use the built in USB for input and output.
I thought part of the flashed image is the software to use the USB interface?
Or must the bootloader of 20 KB be flashed to use the USB interface as serial device?
Of course i found out that there is the mismatching resistor R10 - i fixed it with an 1K8 resistor parallel - but without any result.
I found this page http://amitesh-singh.github.io/stm32/20 ... -pill.html
but i could not compile the software solution:
Code: Select all
// This is required if proper pullup is not present at D+ line.
// This is must for chinese stm32f103c8t6 aka "blue pill"
rcc_periph_clock_enable(RCC_GPIOA);
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, GPIO12);
gpio_clear(GPIOA, GPIO12);
msleep(5); //delay
Code: Select all
RTClock:115:36: error: 'rcc_periph_clock_enable' was not declared in this scope
rcc_periph_clock_enable(RCC_GPIOA);
^
RTClock:116:24: error: 'GPIO_MODE_OUTPUT_2_MHZ' was not declared in this scope
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,
^
RTClock:117:3: error: 'GPIO_CNF_OUTPUT_PUSHPULL' was not declared in this scope
GPIO_CNF_OUTPUT_PUSHPULL, GPIO12);