Closed dzarda closed 4 years ago
It was defined in the include headers for some devices. So, this message is just for information and can be removed or moved to #pragma message
Also, PMA memory is shared between CAN and USB for some devices. In this case, USB_PMASIZE must be defined manually to avoid data overlapping with CAN.
to avoid data overlapping with CAN.
So you're saying that both CAN be used together? (pun intended)
I'm not sure about this, but according to section 32.3 of the RM0316 (STM32F303) it looks possible for the F303D/E
- When the CAN peripheral clock is enabled in the RCC_APB1ENR register, only the first 768 Bytes are available to USB while the last 256 Bytes are used by CAN.
Checked datasheet. Yes, it's possible to use both CAN and USB at the same time. At least for F303xE
PA11, PA12 - USB
PB8, PB9 - CAN
Interesting, F10xxx says
Note: In low, medium-, high- and XL-density devices the USB and CAN share a dedicated 512- byte SRAM memory for data transmission and reception, and so they cannot be used concurrently (the shared SRAM is accessed through CAN and USB exclusively). The USB and CAN can be used in the same application but not at the same time.
Yeah. Sometimes devices from ST make me crazy. What does it mean not at the same time for the single-core CPU?
OK, It doesn't matter. Will use #pragma message
instead of #warning
. It has no side effect with -Werror
option
Cool, closing
What's the reason of having the PMA size configurable? Isn't it fixed for a concrete part number?