It could be several things. It's hard to tell without looking at both schematics for the development board and your own custom board. It definitely seems to be hardware related. Something may have been wired up differently between the two boards.
If it's firmware, maybe an external device/sensor can cause a serial port (such as I2C) to enter an infinite loop at initialization, so check any new peripheral yo may have added to the design.
Have you solved this problem?
Does your discovery board include the 32.768K Hz clock ?
SDK after 3.1.2 will check and wait the 32.768KHz clock input stable!