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.

AFE4403 Watch EVM USB protocol for reading back flash

Other Parts Discussed in Thread: AFE4403

Dear all,

I've recently bought an AFE4403 Watch EVM to develop custom PPG processing algorithms. It all appears to work well with the provided GUI, but when I try to record data "on the field" without an USB connection, then I don't know how to download the content of the flash to the PC.

I looked into the firmware source code, and I see that data is being logged to the flash, but found no way to read it back. I must surely be missing something very obvious...

I've also found in this forum some documentation on the protocol used to communicate over the USB-emulated serial port, but found only register-setting commands, calibration commands, and the like used by the GUI, nothing to read back the flash.

Any help will be greatly appreciated. I can write a custom program on the PC to implement the protocol if any documentation is available.

With best regards,

giorby.

  • Giorgio,

    I'm assigning your post to the correct applications engineers. They should respond soon.

  • Hi Giorgio,

    The following link will guide you to the Wrist Watch Programmer's guide.

    http://www.ti.com/lit/an/slaa671a/slaa671a.pdf

    On the first page of the guide, you will find a link that will allow you to download the firmware to collect the data.

    Best Regards,

    Lakeishia 

  • Dear Lakeishia,
    thanks for the reply. Actually, I am well aware of that document and the associated firmware, as I tried to study it thoroughly.
    Unfortunately, I couldn't find the source code for all of the firmware, so my original question on how to read back the flash remains.
    Below are my findings on the topic, hoping that listing them will help someone point me in the right direction.

    The task of reading back the flash seems to be controlled by the "g_ui8DataLogState" variable, which is controlled by the binary-only afe4403_generic_lib.a library, in the AFE4403.obj file specifically.
    I think that this library is an augmented version of what can be found within the WristWatchFactoryFWSRC-v2.3, as the binary library seems to define many more symbols than I can find in the source tree.
    Now I don't know if the source code for this AFE4403.obj is being kept private or I was simply unable to locate it. It doesn't really matter as I can actually do without it, if only I could figure out how to trigger the state machine in setting the g_ui8DataLogState flag from an USB connection.
    I looked at the document 7357.Message-Communication-Protocol-v3.0-_2D00_-AFE4403EVM.pdf in the hope of finding something useful, but there's a list of only the commands issued by the GUI. Didn't find anything to read back the flash.
    Yet, since the functions to actually perform the reading and to stream the data from flash on CDC via USB are there, and they seem to be correct and functional, I'm sure there must be a way to trigger them, and I also believe they had been tested somehow. Only I can't figure out how to enable this functionality. As I said, it could also very well be something simple and obvious (like pressing a button?), but for some reason after a couple of weeks of trying and studying I can't still figure it out!

    With best regards,
    giorby.
  • Hi Giorby,

     In order to download the logged data, the wristwatch will need to be in the WRISTWATCH_IDLE_STATE

    WRISTWATCH_IDLE_STATE – Disables the AFE, reconfigures heartbeat measurement, and switches to a different scheduler table (idle). At the same time, it enables the USB so the user can download the logged data.

    You will have to press the Push Button a couple of times.

     

    Giorgio Biagetti said:
    The task of reading back the flash seems to be controlled by the "g_ui8DataLogState" variable, which is controlled by the binary-only afe4403_generic_lib.a library, in the AFE4403.obj file specifically.

    This variable holds the return value of the dataLogger function.

    Giorgio Biagetti said:
    Now I don't know if the source code for this AFE4403.obj is being kept private or I was simply unable to locate it

    Currently, the library source code is not part of the SW package, but I'll ask internally to see if it can be shared.

    Hopefully this helps.

      David