0
votes

We are developing a device Which consists of CAN and USB (device mode).Via USB, CAN messages (baud rate of messages can be up to 1Mbps and frequency of messages can be up to 1 message/5milli second) and other datas (example settings data) will transmit between PC and our H/W(Both directions).

I am using Texas instruments TM4C123GH6PM MCU.TI gives support to 6 standard classes given below 1) Audio Device Class 2) CDC Device Class 3) Composite Device Class 4) Device Firmware Upgrade Device Class 5) HID Device Class 6) Mass Storage Device Class

They also give support to a class called "Bulk Device Class" which has 1 bulk in endpoint and 1 bulk out end point.

Which is the better way for implementing USB driver for my application (HID Device Class or Bulk Device Class or CDC Device Class or any other method) so that I can transmit all the messages to and from the PC as fast as possible.

We are also planning to develop a PC tool to display CAN messages and configure the H/W?

I am thinking about going to CDC Device Class? Because I think bulk transfer method is better than interrupt transfer method for my application and only Bulk Device Class and CDC Device Class are using it.

Compare to Bulk Device Class, CDC is a standard class and it does not need any driver and application development is also easy. I don't have any previous experience on USB. Am I taking the correct decision? Please help me?

1

1 Answers

0
votes

Your USB device does not have any specific function/protocol and its only used to transfer raw data. For that I believe its better to use Bulk only class which has only two endpoints and easier to use. For other classes you will have to implement class specific functional descriptors too which will not be a trivial task.

But if you have any time sensitive data then its a different case because bulk endpoint does not guarantee timely delivery. Then its better to use CDC in that case where you will have an interrupt endpoint which can be used.