This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR6043: LEA buffer access and data format

Part Number: MSP430FR6043

Hi.

Two questions on the algorithms:

1. Can we have some sort of an API for the closed-sourse algorithms library? We have developed our own set of algorithms for both dToF and absToF computation but there is quite a lot of overlap with the functions already in the USS library and I can see that they are very well-optimized as they use very little power. Ideally some sort of access to the cross-correlation function (CCF) computation function (whichever one it is out of USS_corr, USS_corr3, USS_corrN) and the peak interpolation.

2. If not -- is it possible to extract the CCF data from LEA memory?
It is probably in one of the gNVMemBlock, gUSSLEATempMemBlock or gUSSLEARAMReservedBlock2 but I've not yet been able to take it apart completely.
What is the variable type and alignment?

Best regards,
Kostyantyn

  • Hi Kostyantyn,

    The APIs we have available for the document can be found here: Ultrasonic Sensing Library API Reference.

    The temporary buffers used by the library can be found here: Recommended USS SW Library Usage. A lot of these are RAM but this will tell you the data type for the buffer.

    If you're developing your own algorithms you would most likely not utilize the algorithm functions, which is where we implement the LEA usage. I suggest looking at the LEA section of the User's Guide (Section 17).

    Regards,

    Luke

  • Hi Luke,

    Thank you for this. The explanations for the buffers are quite useful on the SW Library are quite useful. Small inaccuracy on there though, gNVMemBlock is a int32_t not a int16_t.

    The algorithms that I have developed largely do the same thing as the USS library ones, with some tweaks and fixes for our particular setup and a few scenarios that are quite rare so perhaps your engineers did not encounter during testing.

    The first step in both is the same (I think) -- compute the CCF. However even with LEA I have not been able to get it to compute quite as quickly as in the USS library. Maybe some 16-bit multiplication magic.

    I could share my experience with the algorithms in private so you could potentially improve the library. Or if I can just have the result of the CCF computation available somewhere, e.g. with a pointer similar to USS_getUPSPtr() that would be great!

    Regards,
    Kostyantyn

  • Hi Kostyantyn,

    Thanks for the feedback, the library has been in a stable state for a while so I don't know when/if there will be future updates. The magic is a combination of the IQmath and Qmath libraries to work with floating to fixed point and the LEA module to improve math processing. If there is a large difference between process speed it is most likely our use of the math libraries. 

    Regards,

    Luke

**Attention** This is a public forum