How to decode Oscilloscope Data Capture when File Type is Binary

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to decode Oscilloscope Data Capture when File Type is Binary

Jump to solution
1,428 Views
arun07
Contributor III

Hello Everyone,

I am plotting two unsigned int type variable using FreeMASTER Oscilloscope, these variable changes there value approximately 20ms, but is dependent on external signal so this 20ms can be sometimes 19ms also or 21ms also. That's why I am plotting this variable at fastest possible speed, and selected 0 in sampling period for these variables.

Capture.PNG

I also wanted to save this data in a file along with timestamp, and I can see there is a section named data capture, when file type is selected the text file generated has meaningful data which can be decoded easily, but when binary type is selected, is there some documentation how to decode this data?

I am logging data at a very high rate and hence saving in a text will increase the size drastically.

Any comments related to decoding will be very helpful (my plan is to use Python for this data analysis if needed)

#FreeMASTER

0 Kudos
1 Solution
1,413 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

the format of binary capture file is a simple sequence of 8-byte (double) floating point numbers. We also plan to enable saving in native raw format, but this will appear in one of the future versions.

In general, using Windows and its scheduler to sample and save exact periodic data is not a good approach. There will always be glitches and occasional gaps as a result of Windows swapping and other non-deterministic processing.

With FreeMASTER 3.2 and the latest embedded side driver (e.g. available in MCUXpresso SDK package for i.MX-RT1xxx processors), you should be able to use the FreeMASTER Pipe feature for this purpose. With pipes, the data are produced by the target MCU at custom speed and sent to a pipe endpoint in a binary form or printed as text. The FreeMASTER is then able to capture the data and save to a file.

As pipe transmission is buffered, the data sampling rate achievable with pipes is very close to theoretical limits of the physical line. It is definitely better than the Oscilloscope transmission.

Note: Similarly to Recorder feature, the Pipe requires the active communication over UART, CAN, USB or Ethernet. It will not work over plain JTAG, but may work using JTAG-RTT or PDBDM protocols.

Regards,
Michal

View solution in original post

0 Kudos
2 Replies
1,409 Views
arun07
Contributor III

Thank You, I will explore this also.

0 Kudos
1,414 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

the format of binary capture file is a simple sequence of 8-byte (double) floating point numbers. We also plan to enable saving in native raw format, but this will appear in one of the future versions.

In general, using Windows and its scheduler to sample and save exact periodic data is not a good approach. There will always be glitches and occasional gaps as a result of Windows swapping and other non-deterministic processing.

With FreeMASTER 3.2 and the latest embedded side driver (e.g. available in MCUXpresso SDK package for i.MX-RT1xxx processors), you should be able to use the FreeMASTER Pipe feature for this purpose. With pipes, the data are produced by the target MCU at custom speed and sent to a pipe endpoint in a binary form or printed as text. The FreeMASTER is then able to capture the data and save to a file.

As pipe transmission is buffered, the data sampling rate achievable with pipes is very close to theoretical limits of the physical line. It is definitely better than the Oscilloscope transmission.

Note: Similarly to Recorder feature, the Pipe requires the active communication over UART, CAN, USB or Ethernet. It will not work over plain JTAG, but may work using JTAG-RTT or PDBDM protocols.

Regards,
Michal

0 Kudos