STM32L4 support Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: STM32L4 support

Post by RoccoMarco »

Yes thanks. Let me know!
DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: STM32L4 support

Post 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
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: STM32L4 support

Post by RoccoMarco »

Note that pin should be set as alternate. I missed this in my demo.
DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: STM32L4 support

Post 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));
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: STM32L4 support

Post by RoccoMarco »

Thanks I will take a look.
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: STM32L4 support

Post by RoccoMarco »

Just ordered a USB breakout board.
Thanks to everyone
DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: STM32L4 support

Post 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.
DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: STM32L4 support

Post 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.
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: STM32L4 support

Post 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.
DEHiCKA
Posts: 17
Joined: Thu Feb 21, 2013 8:13 am
Has thanked: 4 times
Been thanked: 3 times

Re: STM32L4 support

Post 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.
Post Reply