Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

programming concepts for CAN and USB protocols

Status
Not open for further replies.

Jinzpaul4u

Full Member level 4
Joined
Feb 1, 2012
Messages
231
Helped
59
Reputation
118
Reaction score
60
Trophy points
1,328
Location
India
Activity points
2,822
Hi there,

Good wishes!

I've to understand the programming concepts for CAN and USB protocols, with interfacing details too. I'm using ARM Cortex M-4 ic's (STM32F405xx). Does anyone can help me for this attempt.
Please suggest to me some good tutorials and websites for learning both protocols.


Thanks in Advance!
 

Actually some of the best general CAN resources are available on the Microchip website:

AN713 - Controller Area Network (CAN) Basics

AN228 - A CAN Physical Layer Discussion

Webinar - Introduction to Controller Area Network (CAN)


Other general CAN bus reference:

Official CAN in Automationsite

CANbus


STM32 specific information:

KEIL STM32 CAN Example

AN3154 - CAN protocol used in the STM32™ bootloader



By the way this site is a good resource for STM32 related documenation:

STM32 CORTEX M0, M3 and M4


BigDog
 
It depends which class of USB device you wish to implement.

Typically the simplest and most straight forward class implement is the Communication Device Class (CDC), which can emulate a serial port by establishing a Virtual COM Port (VCP).


There are several advantages to a CDC implementation with Serial Emulation:

The first being there are no custom drivers required for the PC as it typically utilizes drivers already available in a windows installation, only modification of the INF to include the appropriate VID/PID is required.

The second being as the VCP emulates a standard serial port, legacy software can channel I/O through the designated COMx, just as if it were a normal RS-232 port.

The third being, the API is rather simple and quite similar to that of controlling a standard UART/RS-232 implementation.


STM32 USB Full Speed Device Library

STM32 Firmware Libraries and USB Development Kit



Reference Section 6 Virtual COM port demo:

STM32 USB-FS-Device Development Kit User Manual


BigDog
 
That is,why they're using DMA for CAN communication? is it mandatory to use ? excuse me, I do not have any programming experience on DMA .

No it is not required.

In fact many microcontrollers do not offer any DMA channels.

I would recommend starting your studies of CAN bus by watching the webinar video presentation I posted in reply #2.

BigDog
 
Hi there,

I've been working on ECAN Interface with dspic33fj and its going nicely.

I've a doubt about OSI reference model.

1. What does mean by a frame in embedded communication?
2. How do we differentiate
* a frame of data?
* a byte of data?
* a packet of data?
3. What is the standard length reqiured for a frame?
4. CAN protocol using 2 lower level of OSI reference model for byte of data transmission/reception . but we're sending data as a frame, fame belongs to network section in OSI model. Is it CAN protocol using network layer too?

Any kind of feedback would be greatly appreciated !

Thanks in advance.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top