/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / STM3210E-PRIMER2 and CAN

Username:     
Password:     
             

Forum

# 1   2009-01-09 22:57:24 STM3210E-PRIMER2 and CAN

samarkh
Member
From: Gloucester UK
Registered: 2009-01-07
Posts: 84

STM3210E-PRIMER2 and CAN

I've noticed that the STM3210E-PRIMER2 has an unpopulated IC pads. Looking on the gerber file Primer2_SBOT.gbr, I noticed that it is in position U14.
Further investigation of the schematics revealed that it is a MAX3051ESA


If I was to fit one of these devices, would I have CAN ability, and if so, where does it break out?

Offline

 

# 2   2009-01-09 23:57:43 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

Yes, the CAN will be available on the extension connector if you solder the transceiver. We decided not to solder this device to keep a low price, and because we didn't want to add a specific connector for CAN.
Note that we made some tests too with CAN on the Primer2, and it works.

Offline

 

# 3   2009-01-10 14:06:03 STM3210E-PRIMER2 and CAN

samarkh
Member
From: Gloucester UK
Registered: 2009-01-07
Posts: 84

Re: STM3210E-PRIMER2 and CAN

Thanks Francis for getting back to me.
Yes I see the labels now, Pins 81 & 82 of U2, and Pins 9 & 10 of JP2

Is the code available?


Yours Simon M.

Offline

 

# 4   2009-01-10 14:15:43 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

I will see on Monday if we still have this test code.

Offline

 

# 5   2009-01-19 10:31:01 STM3210E-PRIMER2 and CAN

samarkh
Member
From: Gloucester UK
Registered: 2009-01-07
Posts: 84

Re: STM3210E-PRIMER2 and CAN

Hi Francis, I've got hold of a MAX3051ESA, have you been able to locate the test code?

Yours Simon M.

Offline

 

# 6   2009-03-18 10:53:54 STM3210E-PRIMER2 and CAN

saratoga81
New member
Registered: 2009-03-16
Posts: 7

Re: STM3210E-PRIMER2 and CAN

Hi there,

i'm also interested in the CAN capabilities of the primer2. Francis, did you find any of your test code?

I'm desperately searching for a distributer who can deliver the MAX3051ESA transciever in small quantities (5. pieces). Does anyone know a source?

Or can anyone give me a hint for a comparable transciever to be used with primer2? I saw that the most other trancievers are pin compatible, but is this sufficient to work with primer2?

Thanks for hints
Best ragards
Stefan

Offline

 

# 7   2009-03-18 12:42:30 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

No, we didn't fin our test code. We discard it (after testing the first PCB) when we decided not to solder the transceiver on the board. But this code was quite simple, derivated from the CAN examples provided by STM in the STM32 library.
For the transceiver, I believe that you may buy them online, directly from Maxim:
   http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4299/t/or
Note that the STM32F103 does not allow to use both USB and CAN at the same time. We are thinking about offering a Primer2 variant equipped with the STM32F107 (that allows simultaneous usage of both CAN anad USB). F103 and F107 are pin-to-pin compatible.

Offline

 

# 8   2009-03-18 22:59:07 STM3210E-PRIMER2 and CAN

kubsztal
Member
Registered: 2009-01-27
Posts: 15

Re: STM3210E-PRIMER2 and CAN

saratoga81 :

i'm also interested in the CAN capabilities of the primer2. Francis, did you find any of your test code?

I have CAN working at 500kbps (MCU@72MHz) in silent mode for 11bit IDs. I've used example from STM website as I remember. If you have any problem with CAN configuration just let me know.

I'm desperately searching for a distributer who can deliver the MAX3051ESA transciever in small quantities (5. pieces). Does anyone know a source?

Maxim is the source wink You can buy directly or try to order free samples (up to 2 pieces).

Or can anyone give me a hint for a comparable transciever to be used with primer2? I saw that the most other trancievers are pin compatible, but is this sufficient to work with primer2?

Any transceiver will work under condition that pinout and VCC are compatible. For example SN65HVD230DR (Texas Instruments) - primer doesn't use any low current/standby/sleep functions of CAN transceiver. But you should check value of slope control resistor - in case of Maxim this is ca. 20k (present at PCB) for 500kbps and for TI - 10k. With 20k and TI transceiver you will get something like 250kbps max, maybe +20% in both cases. For 1Mbps you have to connect slope control pin directly to GND. Next thing is terminating resistor also present at PCB. If you're going to connect primer to the existing CAN network (e.g. in car) you have to remove this terminator.

Last edited by kubsztal (2009-03-18 23:01:19)

Offline

 

# 9   2009-03-19 02:27:09 STM3210E-PRIMER2 and CAN

zetaursae
Member
Registered: 2007-12-14
Posts: 14

Re: STM3210E-PRIMER2 and CAN

Newark has It

Manufacturer: MAXIM INTEGRATED PRODUCTS
Newark Part Number: 99K3201
Manufacturer Part No: MAX3051ESA+
Availability: 200
Price For: 1 Each
Minimum Order Quantity: 1
Order Multiple Quantity: 1
Price: $1.94
Qty     Price      Promo Price
1 - 24     $2.15     $1.94
25 - 49 $1.67     $1.67
http://www.newark.com/jsp/search/produc … -G10000683

if you can't get this
you may want to check Microchip , ST, and NXP,  catalog for comparable transcievers

Offline

 

# 10   2009-03-19 08:02:46 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

Take care:  most of the tranceivers support only 5V. You need a 3.3V version  for the Primer2 (I know that ST transceiver is 5V only, that is ok for automotive).

Offline

 

# 11   2009-03-21 13:25:00 STM3210E-PRIMER2 and CAN

saratoga81
New member
Registered: 2009-03-16
Posts: 7

Re: STM3210E-PRIMER2 and CAN

Hi,

thanks for your replies. I tried to order free samples form Maxim but there was a message that my "order" has to be checked by some plant manager. We'll see... if I don't recieve them I'll place a regulare order.

Since we have here some CAN + Primer + STM32 "experts" I would like to ask another question here.

I've some experience, developing software (not hardware) for embedded systems in the automotive environment. Unfortunatelly I have not a very good knowledge about hardware resources needed for certain tasks. Therefore finally my question is, if the STM32 ressources are sufficient to make a CAN logging and display device.

Logging means: writing all incoming CAN messages (11 or 29 bit ID) to a SD card in a format like *.blf or *.asc at bus speeds between 10kbps and 1Mbps and a max busload of 50%

Display means: Display certain Information (results of calculations like trip data/ free configrable CAN signals / maybe some graphs over time) in a nice manner on a graphic display  (a little bit more sophisticated than the primer2 display) . For sure premise for the display function is knowledge of the vehicles CAN Matrix.

The reason for my doubt full question is that I know the high price of professional products with the above mentioned features. Apart from the fact that logging and display in one device is rather rare, the price of the primer is signifcat lower (roughly 5-8 times, for sure Primer2 has no Software for this task and its not made for automotive applications).

I assume that maybe the hardware needs to be more powerfull for such tasks. Can anyone contribute his/here opinion? (may be I'm wrong an the high price is related to other thinks like testing or the high salery of the guy who writes the software)

Thanks
Best regards
Stefan

Offline

 

# 12   2009-03-21 15:32:31 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

My opinion is that logging + storing on the SD card is fully possible. CAN is not 'very fast', and the access to the DMA could be accelerated thanks to the DMA.
We are thinging about providing some Primer2 with the STM32F107 that allows to use both CAN and USB simultaneously.
There would be also a second possibility with the Primer: using the RLink to read the data logged from the CAN bus. The debug module of the Cortex-M3 core allows read access while the CPU is running. We could propose a simple executable to work in that way.

Offline

 

# 13   2009-03-27 23:00:40 STM3210E-PRIMER2 and CAN

Eselchen
Member
Registered: 2008-12-02
Posts: 18

Re: STM3210E-PRIMER2 and CAN

Hi Stefan,
we're using the CAN to transmit sampled data between 2 devices (a sensor- and a displayunit) in heavy industrial enviroments. The displayunit is the user's interface to get out the data on a sd-card. The bus speed ist 500kB and it takes about 1 1/2 hour to transfer 32MB of data. The bus load is about 26% slowed down by the access speed of the sd-card. THIS is the really bottleneck there :-).
This system works fine and is very save due to the usage of the CAN.

Regards

Kai

Offline

 

# 14   2009-03-28 06:55:51 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

I am surprised that the bottleneck is at the SD card. If you run the USB-MS of the CircleOS (3.6), and you copy a 32MB file from the PC to the SD-card, it will take approx. five minutes (I just tried).  It proabably depends on the SD card, and I am using a low cost one.

Offline

 

# 15   2009-03-28 09:59:04 STM3210E-PRIMER2 and CAN

saratoga81
New member
Registered: 2009-03-16
Posts: 7

Re: STM3210E-PRIMER2 and CAN

Hi,

@Eselchen: May I ask you what kind of protocol you are using to transfer the data to the display unit (e.g. SAE TP?).
The data you store is not a CAN log it's sensor data?

In my case the application shall:
-in "offline mode" (no PC connected) log the complete CAN data to the sd card in the Primer2.
-in "online mode" the user shall read the data on the card with a external card reader or via USB.

@Francis: I would highly welcome if the primer would support USB and CAN at the same time. This would give the possibility to use the Primer2 as a USB<->CAN interface.


I'm still waiting for my tranciever samples, but I was promised to recieve them next week:-)

Best regards

Offline

 

# 16   2009-03-28 15:30:03 STM3210E-PRIMER2 and CAN

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM3210E-PRIMER2 and CAN

We have two solutions:
  1. Adapt the primer and CircleOS to the STM32F107 (that allows both CAN and USB to be handled simultaneously)
  2. Use the embedded RLink to read the STM32 memory. The RLink can read the STM32 memory during execution, and download the contents to the PC. For this solution, we would provide some read/write functions. It has been done for the STM8A,

Offline

 

# 17   2009-03-30 15:29:50 STM3210E-PRIMER2 and CAN

Eselchen
Member
Registered: 2008-12-02
Posts: 18

Re: STM3210E-PRIMER2 and CAN

@Francis: we don't use CircleOS because it's an industrial project. I did the same test as you did and you're right.... hrm...  I think, it would be a good idea, to think about the OS we're using. Thanks for the suggestion... ;-)
@saratoga81: we're using a proprietary protocol, because of the overhead of other protocol's. Our's depends on the fact, that we have a real peer2peer-conection. So we could use different ID's as a kind of packetizing (Blocknumber and so on).

Offline

 

# 18   2010-03-02 18:42:27 STM3210E-PRIMER2 and CAN

Nestor_Groel
New member
Registered: 2009-10-23
Posts: 5

Re: STM3210E-PRIMER2 and CAN

I´m very interested in fully implement the can transceiver, but I didn´t understand why you says that 32Mb transfer to an SD memory tooks five minutes. I didn´t try the USB-Prime2-SD transfer, but direct writing of a micro SD from a PC almost save roughtly 1MByte per second.

Again, I´m very interesting in logging or better displaying the CAN info in a primer2. If anybody know any project where I can collaborate, i appreciate the info.

Offline

 

# 19   2010-03-04 15:58:50 STM3210E-PRIMER2 and CAN

Matthias
Member
From: Germany
Registered: 2010-01-30
Posts: 20

Re: STM3210E-PRIMER2 and CAN

Nestor_Groel :

....

Again, I´m very interesting in logging or better displaying the CAN info in a primer2. If anybody know any project where I can collaborate, i appreciate the info.

http://www.stm32circle.com/projects/project.php?id=109

in CAN.C

USB_LP_CAN1_RX0_IRQHandler

Here, the CAN messages are read

CAN Sending

can_debug.c

speek you german ?


Wer Rechtschreibfehler findet, darf sie behalten
english by translate.google.com
Whoever finds typos may keep them

Offline

 

# 20   2010-03-09 05:00:43 STM3210E-PRIMER2 and CAN

Nestor_Groel
New member
Registered: 2009-10-23
Posts: 5

Re: STM3210E-PRIMER2 and CAN

THANKS MATIAS!!!!

Unfortunately I do not speak German, despite my surname sugest. I flash the project tomorrow, THANKS AGAIN

Offline

 

Board footer