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?
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.
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?
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.
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 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.
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).
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)
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.
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.
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.
@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:-)
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,
@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).
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.
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.