Quick clarification of USB CDC buffer sizes when used with CAN on F072
Hi all!
I intend to use USB and CAN on an STM32F072. The datasheet describes a 1KB SRAM buffer, 768B for USB and 256B for CAN.
In CubeMX, when I set up the USB as a VCP, by default it sets 1000 bytes for "USB CDC Tx Buffer Size" and 1000 bytes for "USB CDC Rx Buffer Size". In code these translate to defining APP_RX_DATA_SIZE/APP_TX_DATA_SIZE which are used to create two arrays, so I can't see how these are linked to the dedicated SRAM, but I want to be sure.
Firstly I'd like to clarify, are these two arrays supposed to correspond to the SRAM buffer? If so, shouldn't they be max 512B each and is there a risk of over loading the SRAM buffer by making these arrays too large?
Moreover, when I also set up CAN in CubeMX, these USB buffers do not change and the CAN buffer is non-configurable, do I need to account for the CAN buffer by reducing my USB buffers to 384B each?
Thanks for taking the time to read my question :) any help is appreciated.
