2020-01-21 07:30 AM
hi.
I do have problems in establishing an USB connection to my devices as soon as I run the UTIL_SEQ_Run( UTIL_SEQ_DEFAULT); function in the main while loop.
The Computer does not recognize the device. When I disable this function USB Com Port works normal.
I've already extended my heap size as suggested in:
https://community.st.com/s/article/FAQ-USB-device-not-recognized
Now static allocation is used.
Does anyone have suggestions what to check?
thanks
alex
2020-01-27 01:50 AM
Do you use the latest V1.4.0 version of the CubeWB FW package?
One change was made recently to cut the RNG clock which is also the one used for the USB device.
The easiest way to check this hypothesis is to get the semaphore Sem5.
If you want to keep the USB alive, just get the Sem5 and never release it.
This was done in the examples developed for the dongle. (see below)
void SystemClock_Config( void )
{
#if (CFG_USB_INTERFACE_ENABLE != 0)
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = { 0 };
RCC_CRSInitTypeDef RCC_CRSInitStruct = { 0 };
/**
* This prevents the CPU2 to disable the HSI48 oscillator when
* it does not use anymore the RNG IP
*/
LL_HSEM_1StepLock( HSEM, 5 );
...