cancel
Showing results for 
Search instead for 
Did you mean: 

USB and CAN

shangdawei1
Associate II
Posted on June 28, 2007 at 07:21

USB and CAN

6 REPLIES 6
shangdawei1
Associate II
Posted on May 17, 2011 at 12:15

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 ]

ben2
Associate II
Posted on May 17, 2011 at 12:15

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/O

16-32micros
Associate III
Posted on May 17, 2011 at 12:15

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

shangdawei1
Associate II
Posted on May 17, 2011 at 12:15

Thx a lot !

pav1
Associate
Posted on May 17, 2011 at 12:15

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 ]

ben2
Associate II
Posted on May 17, 2011 at 12:15

I would have to agree that according to the datasheet, they use different memory areas. Of course the datasheet may be wrong