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.
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.
when I went through code, got one more doubt too.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 .
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 !