2020-10-27 02:12 PM
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.
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:
I 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
Solved! Go to Solution.
2020-10-29 11:52 AM
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.
2020-10-27 02:46 PM
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
2020-10-27 03:21 PM
Thank you for your quickly answer! I reply you in order:
What should I make now?
Thank you so much,
Jorge
2020-10-27 03:46 PM
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
2020-10-27 05:23 PM
I soldered a 8MHz crystal and 22pF capacitors to the LRWAN DISCO board and made connection as shown:
I still have the same problem... =S
2020-10-27 09:04 PM
This is a VCP for the Murata module that a colleague built a while back. As I recall it used the HSI48
2020-10-29 11:52 AM
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.