Skip to main content
JHerr.4
Associate
October 27, 2020
Solved

PC USB does not recognize CMWX1ZZABZ-078 in a custom board (based on the B-L072Z-LRWAN-1)

  • October 27, 2020
  • 2 replies
  • 3404 views

Hello everyone,

I developed a custom board based on the B-L072Z-LRWAN-1 Discovery Kit. I could flash the CMWX1ZZABZ-078 (STM32L082 + SX11276) and every function work well. The problem is in the time when trying to communicate with the PC throught USB.

  1. Before flashing the module for the first time (just connecting the pcb as it came from manufacturer), the PC does not detect it.
  2. After flashing it wit the STM32CubeIDE or the mbed online compiler, the PC detect it but it does not recognize it.

I downloaded ST USB drivers from ST website but it does not fix it

The schematic and layout looks good and I designed the USB lines with 90 ohm impedance. I attached picture:

0693W0000059XL5QAM.png0693W0000059XNfQAM.pngI measured voltages and they are okey (5V line is 4.8v and 3V3 line is 3.31v)

Does anyone could help me to find out what can be wrong?

Thanks in advance,

Jorge

This topic has been closed for replies.
Best answer by Isaac Fróes

Thank you Clive for the help, we find the problem, it was the stack and heap sizes. We increased the Heap and Stack minimum size from 0x100 to 0x800. In our working setup we are using the internal 48MHz clock (RC 48 MHZ) for the USB, Heap and Stack sizes of 0x800 and a 2000 ms delay right after the USB init function.0693W0000059ne3QAA.png0693W0000059ndtQAA.png0693W0000059ne8QAA.png

2 replies

Tesla DeLorean
Guru
October 27, 2020

Make sure the builds are not using PA12 to turn on the TCXO

Test the code on a LRWAN DISCO board, with the solder-bridges made to connect to user USB

Not sure if it has USB Boot Loader, could try BOOT0=HIGH, see if it comes up as an STM32 DFU device

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
JHerr.4
JHerr.4Author
Associate
October 27, 2020

Thank you for your quickly answer! I reply you in order:

  1. PA12 is not used, just assigned to USB_DP.
  2. I tried with the LRWAN DISCO user USB as you said (by soldering SB15 and SB16 jumpers) and I have same problem. It detect the USB but it does not recognize it.
  3. When I reset the device while BOOT0 is High, it is recogniced as STM32 device in DFU mode as shown in picture below:

0693W0000059XYiQAM.pngWhat should I make now?

Thank you so much,

Jorge

Tesla DeLorean
Guru
October 27, 2020

So HW is viable.

With USB, going to want to make sure HSE source looped in (Pin 47 to 46), and HSE_VALUE is correct (32 MHz), and PLL settings and USB clock getting to 48 MHz

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Isaac Fróes
Associate II
October 29, 2020

Thank you Clive for the help, we find the problem, it was the stack and heap sizes. We increased the Heap and Stack minimum size from 0x100 to 0x800. In our working setup we are using the internal 48MHz clock (RC 48 MHZ) for the USB, Heap and Stack sizes of 0x800 and a 2000 ms delay right after the USB init function.0693W0000059ne3QAA.png0693W0000059ndtQAA.png0693W0000059ne8QAA.png