Home arrow Support arrow Forums

Luminary Micro Forums

<< Start < Prev 1 2 Next > End >>

awneil

Platinum Boarder

2010/02/09 09:42

Re:MDL BDC24 Black Jaguar to PC problem

vovacooper wrote:
The "Sniffer" is a Serial port monitor program that's shows me what happens on the serial port.
Do you trust it?
Are you sure that the leading FF and trailing 00s aren't "artefacts" of the sniffer...?

login or register to reply

vovacooper

Expert Boarder

2010/02/09 11:11

Re:MDL BDC24 Black Jaguar to PC problem

Yes i am sure that the FF is from the driver,
i write a program that controls the driver and if i don't send the "FF" the driver doesn't respond.
also i have a lot of problems with the protocol, can you give me any number to call someone that would help me with the serial protocol.

thank you.

login or register to reply

TI Bobby

Moderator

2010/02/09 12:39

Re:MDL BDC24 Black Jaguar to PC problem

Regarding the protocol: Taking a look at chapter 5 in the SW-RDK-BDC24-UG-5570.pdf document, you will see that when you are using the UART interface, Byte 0 is defined as the SOF byte, which has a value of 0xff. Byte 1 is the Size byte, which will vary depending on the message.

So, taking a look at the first sample packet that you referenced:
#volt set 10
the code is:
ff 06 81 00 02 02 0a 00

Byte 0 is "ff" which is the SOF character.
Byte 1 is "06" which is the Size byte, indicating that there are 6 additional bytes remaining in the packet.

Byte 2 is "81" which is defined as ID0.
Byte 3 is "00" which is defined as ID1.
Byte 4 is "02" which is defined as ID2.
Byte 5 is "02" which is defined as ID3.
Byte 6 is "0a" which is defined as Data (first byte).
Byte 7 is "00" which is defined as Data (second byte).

As you can see in Chapter 5, the messages on the UART interface are simply an encapsulated version of the CAN bus messages, meaning that all messages bytes starting with Byte 2 are actually the same as the CAN bus messages, which are defined in Chapter 4.

So, moving to Chapter 4, we can start decoding with Byte 2

Byte 2 is defined as ID0. The lower 6 bits of ID0 are the device ID. In this case, you are communicating with Device ID 1.

The upper 2 bits of Byte 2 (ID0) concatenated with Byte 3(ID1) define the API that you are using (002). This field is further broken down into two separate fields, a 6-bit field(00) followed by a 4 bit field(2). The first field indicates the API class of "Voltage Control" (table 4.4). If you go to section 4.3 (Voltage Control Interface), you will see that the second field(2) indicates an API of "Voltage Set".

Byte 4 is defined as ID2, which indicates the Manufacturer. Table 4.3 shows the value of 2 to indicate "Texas Instruments (Stellaris)".

Byte 5 is defined as ID3. The upper three bits of this field are not used. The lower 5 bits(02) indicate device type. From Table 4.2, the device type is "Motor Controller".

Since from ID0/ID1, this has been identifed as a Voltage Control API, we then turn to section 4.3 to determine what the required data bytes are. In the section "Set Output Voltage" which corresponds to value 2 "Voltage Set" in Table 4.6, you can see that the first parameter is a 16 bit (little endian) signed number. The "0a 00" represent a signed value of 10. Since the optional second parameter is not included, this indicates that the value should be updated immediately.

Hope this helps.
--Bobby

login or register to reply

vovacooper

Expert Boarder

2010/02/09 14:49

Re:MDL BDC24 Black Jaguar to PC problem

hi.

can you tell me where can i find the SW-RDK-BDC24-UG-5570.pdf document?
i downloaded all the document's and cd's but i didn't found it, the one that seem'd like it is the SW-RDK-BDC-UG-5570.pdf but it's the BDC version and not the BDC24 so there is no chapter 5.

can you please give me a link to this document or send it to me.

thank you.
vovacooper@gmail.com

login or register to reply

TI Bobby

Moderator

2010/02/09 16:01

Re:MDL BDC24 Black Jaguar to PC problem

This is a recently released module. The stand-alone package for this has not yet been posted to the software updates web site. However, if you download and install the full Stellaris package (SW-LM3S-5570), this will contain the board folder for the RDK-BDC24 along with the BDC24 users guide PDF in the docs folder.

A link to the Software Updates page is here (http://www.luminarymicro.com/products/software_updates.html).

My aplogies for the mixup on the documentation references.
--Bobby

login or register to reply

vovacooper

Expert Boarder

2010/02/09 16:09

Re:MDL BDC24 Black Jaguar to PC problem

thank you. i found it :)
hopefully it will help.

login or register to reply
<< Start < Prev 1 2 Next > End >>