Browse
STMicroelectronics Community
FAQs
Sign In
Product forums
STM32 MCUs
STM32 MCUs Products
STM32 MCUs Boards and hardware tools
STM32 MCUs Software development tools
STM32 MCUs Embedded software
STM32 MCUs TouchGFX and GUI
STM32 MCUs Motor control
STM32 MCUs Security
STM32 MCUs Wireless
STM32 MPUs
STM32 MPUs Products
STM32 MPUs Boards and hardware tools
STM32 MPUs Embedded software and solutions
STM32 MPUs Software development tools
MEMS and sensors
MEMS (sensors)
Imaging (sensors)
Automotive and Transportation
Automotive MCUs
AutoDevKit Ecosystem
GNSS positioning
Edge AI
Analog and audio
Interface and connectivity ICs
Power management
ST25 NFC/RFID tags and readers
STM8 MCUs
Other: hardware
Other: software
Knowledge base
STM32 MCUs
STM32 MPUs
MEMS and sensors
Analog and audio
EMI filtering and signal conditioning
Interface and connectivity ICs
Power management
Quality & reliability
Academy
About
Community guidelines
Feedback forum
Community blog
Developer news
RPers
Associate II
since
2019-08-06
2023-06-14
User statistics
5
Posts
0
Solutions
0
Kudos given
0
Kudos received
STMicroelectronics Community
About RPers
Options
Report User
User Activity
Posts
Replies
Hello, I have implemented the code for the USB VCP, but when debugging the code the "pdev->pClassData" is always null (0). Where is this class initialized? code line : USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
2020-04-17
Cube MX 5.6.1 generated code:void MX_USB_DEVICE_Init(void){ /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ /* USER CODE END USB_DEVICE_Init_PreTreatment */ /* Init Device Library, add supported class and start the library. */ if (USBD_Init(&h...
Re: Hello, I have implemented the code for the USB VCP, but when debugging the code the "pdev->pClassData" is always null (0). Where is this class initialized? code line : USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
2020-04-19
Thanks I noticed that there seems to be a delay.I will give it a shot.Rex
Re: Hello, I have implemented the code for the USB VCP, but when debugging the code the "pdev->pClassData" is always null (0). Where is this class initialized? code line : USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
2020-04-19
Yes I do have FreeRtos implemented.Thanks for the hintRex
Re: Hello, I have implemented the code for the USB VCP, but when debugging the code the "pdev->pClassData" is always null (0). Where is this class initialized? code line : USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
2020-04-19
Thanks PavelRex
Re: Hello, I have implemented the code for the USB VCP, but when debugging the code the "pdev->pClassData" is always null (0). Where is this class initialized? code line : USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassData;
2020-04-18
Thanks for the reply. I will look into thisRex