Page 4 of 5

Re: STM32L4 support

Posted: Tue Nov 22, 2016 6:43 pm
by RoccoMarco
Yes thanks. Let me know!

Re: STM32L4 support

Posted: Thu Nov 24, 2016 4:19 pm
by DEHiCKA
No luck for me with RT-STM32L432KC-NUCLEO32-USB_CDC.
Onboard led stops blinking when cable is connected and "USB Device not recognized" on PC side.
Tried couple different cables, 1.5K pullup on D+ (ARD_D2), and D2/D10 pins to Alternate 10 mode before usbStart().

My connections:
ARD_D2 (PA12) -> 20 Ohm Res -> USB_DP (Green)
ARD_D10 (PA11) -> 20 Ohm Res -> USB_DM (White)
GND -> GND - BLack

Re: STM32L4 support

Posted: Thu Nov 24, 2016 4:53 pm
by RoccoMarco
Note that pin should be set as alternate. I missed this in my demo.

Re: STM32L4 support

Posted: Thu Nov 24, 2016 6:24 pm
by DEHiCKA
Yes, as I've mentioned they are set to alt10 before usb calls:

Code: Select all

  palSetPadMode(GPIOA, GPIOA_ARD_D10, PAL_MODE_ALTERNATE(10));
  palSetPadMode(GPIOA, GPIOA_ARD_D2, PAL_MODE_ALTERNATE(10));

Re: STM32L4 support

Posted: Thu Nov 24, 2016 8:39 pm
by RoccoMarco
Thanks I will take a look.

Re: STM32L4 support

Posted: Fri Nov 25, 2016 11:00 am
by RoccoMarco
Just ordered a USB breakout board.
Thanks to everyone

Re: STM32L4 support

Posted: Sat Nov 26, 2016 7:18 pm
by DEHiCKA
I believe any old USB cable would do the job.
I've also did the clock source reconfigure to HSE bypass from onboard ST-LINK 8Mhz. No luck, still the same behavior:
exception at the descriptors read, when cable is connected.

Re: STM32L4 support

Posted: Mon Nov 28, 2016 1:56 pm
by DEHiCKA
UPD: CubeMX + Keil simple USB CDC project runs fine with just a cable cut and connected to PA11 & PA12 & GND.
So it is not a harware or clock problem.

Re: STM32L4 support

Posted: Mon Nov 28, 2016 2:02 pm
by RoccoMarco
Can you sent us the stack trace status when application stucks? The enumeration starts? It stucks when you connect the cable or it even if it is disconnected?

Edit: I have edited few things. Checkout trunk before perform tests.

Re: STM32L4 support

Posted: Mon Nov 28, 2016 4:35 pm
by DEHiCKA
It stucks when the cable is connected. Updated lld and registry from trunk, no change:

Thread [1] (Suspended)
9 _unhandled_exception() vectors.c:46 0x08005580
8 <signal handler called>() 0xfffffff1
7 usb_lld_read_setup() hal_usb_lld.c:746 0x08003a7a
6 _usb_ep0setup() hal_usb.c:757 0x08003a7a
5 usb_serve_endpoints() hal_usb_lld.c:328 0x0800109c
4 Vector14C() hal_usb_lld.c:443 0x0800109c
3 <signal handler called>() 0xfffffffd
2 <symbol is not available> 0x55555554
1 <symbol is not available> 0x55555554

On PC side:
Unknown USB device
A request for the USB device descriptor failed.