8051 with both USB and CAN interfaces ?

Jan 22, 2012 27 Replies

Yes, I did notice that. According to the Reference manual all the STM32F10x apart from STM32F105 and STM32F107 have the USB and CAN peripherals share the same internal memory so can't be used at the same time :

"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 RAM is accessed through CAN and USB exclusively). The USB and CAN can be used in the same application but not at the same time."

On 25/01/2012 15:45, Rich Webb wrote: > To clarify this a little, STM32 configuration registers allow either a > main function (typically GPIO) or an alternate function (e.g., UART, > SPI, CAN, ...) to control the I/O circuitry at a given pin. On some > devices the USB and CAN lines are both alternate functions on the same > pin, so if both peripherals are enabled and if the pin is set to use the > alternate function then they'll fight for control of the pin and Bad > Things Happen.

As you say, there is the issue with the pins too, but AFAIK it is the shared RAM which is the showstopper in respect of using CAN and USB simultaneously on all except the Connectivity line devices in this range. This means buying the more expensive STM3210C-EVAL board instaed of the STM3210E-EVAL :-(

Thanks to you both,

Boo

and here is a low cost board that may possibly help you on your way:

formatting link

Cheers Don...

=========================

Don McKenzie Dontronics: http://www.dontronics-shop.com/ DuinoMite the PIC32 $35 Basic Computer-MicroController http://www.dontronics-shop.com/the-maximite-computer.html Just add a VGA monitor or TV, and PS2 Keyboard. Arduino Shield, Programmed in Basic, or C.

RAM

Well bugger me. Good catch. Apparently there's another paragraph that I need to highlight. ::sigh::

Rich Webb Norfolk, VA

same

STM32F10x

the

dedicated

cannot be

exclusively).

time."

a

same

the

shared RAM

on all

the more

It just depends on which STM32 you choose. The early devices do have shared buffers so you can't use them both simultaneously. ST saw the error of their ways and released products that do not have this restriction. I have used STM32 on a board with dual CAN and USB all running simultaneously.

Iain

--------------------------------------- Posted through

formatting link

Do you happen to remember which STM32 family ?

Which part, how many pins ?

shared

have

Off the top of my head - I'm not in the office at the moment - it was an STM32F105RCT6 which is a 64 pin LQFP. I'll try to remember to check and post again if it was a different part.

Iain

--------------------------------------- Posted through

formatting link

The connectivity line (105/107) can serve both USB and Can. The smaller parts can not. Have a close look at rm0008.

Bye

Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required