cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32CubMx usb

James Carter
Associate
Posted on September 21, 2017 at 15:18

Unable to configure USB_DEVICE on STM32F070F6PX in STM32Cubemx.

STM32CubeMx version 4.22.1

Attempting to build a Virtual com.

Created cube project, configured USB port and Uart.

Added USB_DEVICE virtual com Middleware.

Basically everything you need to get a virtual com started.

Created and Iar EWARM project and compiled.

Looked at map file, project does not fit in ram memory.

Size of ram in map file is > 0x1800 the ram size of the part.

If I leave the middleware out it fits.

How would I use the USB as any of the device profiles without the middleware?

#unable-to-configure-usb_device-on-stm32f070f6px-in-cube
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on September 22, 2017 at 01:32

Hello!!

Goto usbd_cdc_if.c file  and reduce the allocated ram  size defined from following definitions

#define APP_RX_DATA_SIZE

#define APP_TX_DATA_SIZE

Regards

VF

View solution in original post

2 REPLIES 2
Posted on September 22, 2017 at 01:32

Hello!!

Goto usbd_cdc_if.c file  and reduce the allocated ram  size defined from following definitions

#define APP_RX_DATA_SIZE

#define APP_TX_DATA_SIZE

Regards

VF

Posted on September 22, 2017 at 14:24

Thank you, that worked.

Looking closer, I was able to modify the APP_RX_DATA_SIZE and APP_TX_DATA_SIZE in the Cube configuration under Middleware.

I change it to 512 for both and it compile fine.

Probably a compliment to the ST developers, but I am so used to the basic configuration just compiling and working.