2018-08-30 06:36 AM
Hello,
I am trying the USB Communication stm32f303 with android phone usins CDC USB TERMINAL app . I am able transmit all the string. But while reception I am receiving only the first character.
2018-08-30 08:24 AM
Hello @Manoj Hiwarkar ,
I recommend you the CDC example available in the STM32CubeF3 package at this path:
STM32Cube_FW_F3_V1.10.0\Projects\STM32303C_EVAL\Applications\USB_Device\CDC_Standalone
You can follow the instructions on the readme file to make a basic USB CDC project.
With Regards,
Imen.
2018-08-31 05:57 AM
Hi Imen,
Thank you for the example. Do you have a similar one for the F3030ZE Nucleo board? I am trying hard to get the CDC usb interface running but it doesnt work so far. The device just even doen't appear in the device manager. Is there maybe a configuration problem in CubeMX? I attached the cubeMx file.
I would be very thankful if you could help me!
Thank you a lot in advance.
Best regards
2018-09-03 01:44 PM
ST should be really ashamed of itself at this point, in the Cube Repository there are no HAL MSP source files in any of the USB application projects. These would really be necessary to show how the interrupts and the GPIOs should be set up for the USB. Specifically the part where (at least for F3 and earlier series) a GPIO in output mode is tied to USB_DP line with 1K5 to control the attached state of the USB device. This is pin PG6 for this Nucleo board in question, which I could only find out from the schematics, as when opening the board in CubeMX the pin shows up as "USB PowerSwitchOn" (that functionality is not present on this Nucleo at all).
Long story short, don't count on out-of-the-box solutions. To solve your problem just set up PG6 as PP output, and paste this code in a source file of your choosing:
#include "stm32f3xx_hal.h"
void HAL_PCDEx_SetConnectionState(PCD_HandleTypeDef *hpcd, uint8_t state)
{
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_6, state);
}
(I would link to the post from half a year ago where I explained the same, but I can't recover it from the old forum engine.)
2018-09-03 11:56 PM
Ok my problem is solved. I am getting the whole string now
2018-09-10 04:35 AM
@Imen DAHMEN : I still have the problem that I cannot connect my nucleo board stm32f303ZE with with the PC via USB by using the CUbeMX generated Code. Do You have an example also for this nucleo board?
I would be very thankful!
Best regards,
2018-09-18 03:48 AM
Hello @Bench ,
I recommend you to increase heap and stack sizes in the CubeMx setting.
There is no USB CDC example available in the STM32CubeF3 for STM32F303ZE. You can get inspired from other CDC examples to develop your own project.
With Regards,
Imen.
2018-09-20 06:46 AM
Hi @Imen DAHMEN
thank you for the recommendation. I already did that. Unfortunately it still doesnt work. Above is the Cube file I use and the generated code doesnt include the GPIO Config for the pins. So I think there might be a bug in Cube. The Code looks also different if I generate an USB project for the L4 for example. There the Pins are configured and the functions are not empty as in the COde for F303ze. Could that be?
Thanks a lot and best regards
2018-09-21 03:00 AM
Hi @Bench,
Is this issue encountered using latest version of STM32CubeMx V4.27.0?
If you are using previous version of CubeMX, please update it to use the last one (V4.27.0) and check if this resolve your issue.
With Regards,
Imen
2018-09-21 07:49 AM