cancel
Showing results for 
Search instead for 
Did you mean: 

Endianness of 'in the air' data bytes

JNoci.1
Associate II

We are evaluating if we can use the STM32 to interface to existing devices. The critical fator is the expected endianness of the data. I have seen no reference in the docs if this can be set, so I have provided an example message and would like to know if this can correctly interpreted by the STM.

The following sequence defines the values of bits 'in the air' as recorded on an oscilloscope. The most left bit is the first bit transmitted.

10101010 10101010 10101010 10101010 These are the 4 preamble bytes. Byte value is 0x55 with LSB

of each byte transmitted first

00110011 01010101 00110011 01010101 These are the 4 Sync bytes 0xCC 0xAA 0xCC 0xAA in sequence

of transmission, with LSB of each byte transmitted first

01000000 10000000 00000000 The first byte is the Variable Length : Value is 0x02, LSB

transmitted first. The data bytes are 0x01, 0x00, LSB

transmitted first

01110100 11110110 The CRC is computed on the 3 bytes above. The CRC value is 0x6F2E

The LSByte of the CRC is sent first, LSB of byte first

Can the device be set to receive this bitstream correctly. I am specifically worried as to how the data bits (specifically the message length value) are interpreted by the Receiver - as if this is not interpreted correctly (ie in the opposite order of bits), the receiver will be expecting a msg of length 0x40 instead of 0x02.

If need be, I could manage to do the CRC in software, but the above point is critical.

4 REPLIES 4

What parts are we talking about?

Pretty sure the SEMTECH radio is MSB first, and not configurable. You might want to converse with them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
JNoci.1
Associate II

Part envisaged for use is the STM32WLE5, to be used in an FSK type mode. I think the RF core is the SX1262, but cannot find a for sure reference - also the endianness does not seem to stipulated or indeed, referenced, in either the SX1262 or STM32 data packs. And we have been trying to converse with them for a while now - in fact my case reference was posted nearly 10 days ago, with repeated requests for someone, anyone, at ST to please respond - nothing to date...

ST does not engage here, you should work via the sales and engineering support, the level of support generally being tempered by the size of the customer.

You'll have to pick up a phone.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

https://blog.st.com/stm32wl/

"The new device embeds a specially engineered radio based on Semtech SX126x that offers two power outputs: one up to 15 dBm and the other up to 22 dBm."

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..