7 years, 4 months ago.

Can I use USBDevice Library?

I'd like to use USBSerial using PA13, PA14, but it seems that L073 is not registered in the USBDevice library, but can somehow be used?

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32L073RZT6 microcontroller.

1 Answer

7 years, 4 months ago.

I am just a beginner, so my answer must be taken with caution. For me, yes you can use the usb serial as shown below (example running on NUCLEO-L073RZ board) but may be not with pins PA13 and PA14. On the NUCLEO-L073RZ board these pins are not useable. It also seems not possible to use them as USB wires with other boards. The section "pin descriptions" of the data sheet (pages 42 and next) does not mention usb function for these pins.

http://www.st.com/content/ccc/resource/technical/document/datasheet/d8/b3/7b/dc/18/22/44/f5/DM00141036.pdf/files/DM00141036.pdf/jcr:content/translations/en.DM00141036.pdf

Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myLed(LED2);

int main() { int i = 1 ; myLed = 0 ; pc.printf("Hello World!\n"); while(1) { char c = pc.getc(); Read hyperterminal wait (1) ; pc.printf("This program runs since %d seconds.\n", i++) ; if ( (i % 2) == 0){ myLed = 1 ; } else { myLed = 0 ; } } }

Thank you Hervé DELACOURT. However, since it is planned to finally use the ST-LINK part separately, I do not want to use SERIAL_TX / SERIAL_RX and I would like to try using pure USB. Signal lines are out on the connector, and since USB pin was mentioned in PinNames.h, I am happy if it can be used. L4xx is registered in the library but there is a reason why L0xx is not registered · · ·

posted by Takahito Niino 19 Jul 2017