Discussion in 'Tutorials' started by admin, Jun 21, 2016.
Atmel Studio project files are available for download here: http://bit.ly/1Uu5T5H
Looks great, but I can't download the application.
You're absolutely right! A permission setup error disabled any downloads in that category. Fixed and should work now. Thanks for letting us know!!
I'm looking at the example code now. I see that to enable the raw data (Baseband Amplitude/Phase output), you send different bytes than explained in the datasheet:
From the code example (protocol.c line 453):
process_byte(XTS_SPC_DIR_COMMAND, callback, user_data);
process_byte(XTS_SDC_APP_SETINT, callback, user_data);
process_int(reference, callback, user_data);
process_int(data_length, callback, user_data);
process_ints(data, data_length, callback, user_data);
While in the serial protocol, it says the following are the bytes for enabling raw data:
<START> + <XTS_SPC_APPCOMMAND> + <XTS_SPCA_SET> + [XTS_SACR_OUTPUTBASEBAND(i)] + <EnableFormat> + <CRC> + <END>
As you can see, there are differences between example code and the documentation. I'm assuming the documentation is wrong?
That's correct the documentation is completely wrong.
// 0x7D + 0x90 + 0x71 + 0x10 + 0x00 + 0x00 + 0x00 + 0x01 + 0x00 + 0x00 + 0x00 + 0x02 + 0x00 + 0x00 + 0x00 + CRC + 0x7E (crc=0x8f) = Enable Amp/Phase packet
The code in the example will work.
Thank you for your subscription!