2007-06-27 10:21 PM
USB and CAN
2011-05-17 03:15 AM
Can i use both USB and CAN ? usb/can uses the same pins.
how to use ? [ This message was edited by: shangdawei on 17-06-2007 13:33 ]2011-05-17 03:15 AM
it looks as if you can only use both in hte 64+ pin versions.
see page 87 of the programming datasheet. IT explains about remapping CAN I/O2011-05-17 03:15 AM
Hi shangdawei,
If your application is not going to use USB and CAN simultaneously (at the same time) you can remap by software the CAN TX and RX pins (to PB8 & PB9 or PD0 & PD1) and design your board with separated pins (and connectors) for these two peripherals. But as I said, this is possible only when you are not using both of the USB and CAN at the same time : in fact, in the STM32 the USB and the CAN shares the same RAM memory for data reception and transmission. So it’s not possible to run both of these two communications peripherals at the same time. For more details about the alternate function software remapping please refer to the ''STM32F101xx and STM32F103xx advanced ARM-based 32-bit MCUs Reference manual'' section ''5.3 Alternate function I/O and debug Configuration (AFIO)''. With best regards STOne-322011-05-17 03:15 AM
Thx a lot !
2011-05-17 03:15 AM
Quote:
On 19-06-2007 at 10:03, Anonymous wrote: Hi shangdawei, If your application is not going to use USB and CAN simultaneously (at the same time) you can remap by software the CAN TX and RX pins (to PB8 & PB9 or PD0 & PD1) and design your board with separated pins (and connectors) for these two peripherals. But as I said, this is possible only when you are not using both of the USB and CAN at the same time : in fact, in the STM32 the USB and the CAN shares the same RAM memory for data reception and transmission. So it’s not possible to run both of these two communications peripherals at the same time. For more details about the alternate function software remapping please refer to the ''STM32F101xx and STM32F103xx advanced ARM-based 32-bit MCUs Reference manual'' section ''5.3 Alternate function I/O and debug Configuration (AFIO)''. With best regards STOne-32 I really do not see any sharing between CAN and USB memory areas. Can you give us more details? Thanks. USB - 5C00-63FF CAN - 6400-67FF [ This message was edited by: pavelixer on 27-06-2007 22:01 ]2011-05-17 03:15 AM
I would have to agree that according to the datasheet, they use different memory areas. Of course the datasheet may be wrong