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.

AFE4404: AFE4404

Part Number: AFE4404

Hello,

I am trying to increase AFE4404 data reporting frequency to around 60 HZ using the following public arduino code.

https://github.com/rakshithbk/AFE4404-Library/blob/master/AFE_Connect/AFE_connect.cpp

But however I tried to adjust the register values, I cannot successfully make it read as fast as 60HZ. It is now 30HZ by the way.

Can anyone help me? Thanks a lot.

  • Hi,

    Do you happen to have/use the evaluation kit/board(EVM)?

    May I ask what do you mean by "Data Reporting Frequency"?

    "adjust the register values" - which registers did you adjust and adjust to what?

    Thanks

  • Hi. I am using the AFE4404. 

    The "Data Reporting Frequency" means the speed that the ppg signal can report a new data point.

    Please see the page 23 of the datasheet. 

    https://www.ti.com/lit/ds/symlink/afe4404.pdf?ts=1668352012471&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FAFE4404%253Futm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dasc-null-null-GPN_EN-cpc-pf-google-wwe%2526utm_content%253DAFE4404%2526ds_k%253DAFE4404%2526DCM%253Dyes%2526gclid%253DCj0KCQiAyMKbBhD1ARIsANs7rEHXHgfn2upOcwZcIpfq_TH07OQhMXRmGG7_af-q_h8aPKbIwcqFB8oaApSdEALw_wcB%2526gclsrc%253Daw.ds

    I am trying to modify this timing diagram to make the period of one cycle to be smaller. So that AFE4404 can report at a higher frequency.

    For register values, please see the page27 of the datasheet, I am trying to adjust the column "REGISTER VALUE".

  • Hi,

    Do you happen to have/use the AFE4404 evaluation kit/board(EVM)?

    --------------------------------------------------------------------------------------------

    And, what clock(external or internal)? and clock frequency do you use?

    What is the OSC_ENABLE setting?

    0 = External clock mode (default). In this mode, the CLK pin functions as an input pin where the external clock can be input.

    1 = Enables oscillator mode. In this mode, the 4-MHz internal oscillator is enabled.

    -------------------------------------------------------------------

    Do you use SPI or I2C interface?

    Could you let me know what are your phase(s) settings? e.g. how many LED and whether use ambient phase(s)?

    ---------------------------------------------------------------------------

    Refer to 7.5 Electrical Characteristics and Table 13. Clock Domains and Operating Ranges

    The "data rate" for AFE4404 supports range from 10 to 1000 sample per second(SPS), which is determined by the PRF(Pulse repetition frequency), which is set by the  CLKDIV_PRF and PRPCT, and then every cycle of a PRF results in four 24-bit digital samples at the output of the AFE, each of which is stored in a separate register.

    What are your CLKDIV_PRF and PRPCT values when it's 30 samples per second?

    By referring to page 27, Table 11. Sample Register Settings, Could you reduce the PRPCT to lower value and see whether the data rate increases? 

    Thanks

  • Hi,

    I am setting the OSC_ENABLE = 1.

    I use I2C interface. and I use all 3 LED.

    I use the exact register setting in the diagram. Please see the picture below. That's how I setting the register now.

    I set the CLKDIV_PRF to be 1, and PRPCT to be 39999.

    I have tried to lower both the PRPCT and the end of pdn cycle. I mean I set the line 66 and line 67 to be

    set_pdn_cycle_start_end(5471, 24199);

    set_prpct_count(24999);

    So that the difference is still 24999-24199=800 counts to satisfy the minumum requirement in the datasheet (Since 800/4M = 200us.). Please see the picture below.

    But that doesn't help. Do you have any other idea.

    Thanks.

  • Hi,

    Do you happen to have/use the AFE4404 evaluation kit/board(EVM)?

    -----------------------------------------------

    Understood that 

    -setting the OSC_ENABLE = 1. Enables oscillator mode. In this mode, the 4-MHz internal oscillator is enabled.

    -use I2C interface. and use all 3 LED.

    ----------------------------------------------------------

    Could you try to set

    (CLKDIV_PRF = 1) and PRPCT = 39999 first, and see what are the frequency and/or cycle for the ADC_RDY?

    (CLKDIV_PRF = 16) and PRPCT = 2499 first, and see what are the frequency and/or cycle for the ADC_RDY?

    Thank

  • Hi ChienChun,

    Do you happen to have/use the AFE4404 evaluation kit/board(EVM)?

    As per the information I gathered from the customer (Anjali), they are not using AFE4404EVM. And they have AFE4404 a custom board connected to an Arduino UNO. They are also trying to set the AFE4404 register values to set frequency of 1khz.

    I hope you can also help with this. 

  • Yes,

    Since they are not using the EVM, so some step by step troubleshooting are required -

    Could they try to set

    (CLKDIV_PRF = 1) and PRPCT = 39999 first, and see what are the frequency and/or cycle for the ADC_RDY?

    (CLKDIV_PRF = 16) and PRPCT = 2499 first, and see what are the frequency and/or cycle for the ADC_RDY?

    Thanks