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.

TMS320F28P650DH: Change OSR dynamically

Part Number: TMS320F28P650DH

Tool/software:

Hi,

is it possible to change the OSR dynamically without resetting the SDFM module ?

Thanks

Geoffrey 

  • Hi Geoffrey,

    I can't find anything in our documentation directly confirming if on-the-fly changes to OSR are possible, but I cannot find anything explicitly stating that it isn't supported either. Have you tried any experiments with this?

    Best Regards.

    Zackary Fleenor

  • Hi,

    I've done the test on F28P65 launchpad with nothing connected to the SD_data input. In the fifo ISR, I reconfigure the OSR with SDFM_setFilterOverSamplingRatio every 10 samples. This is what I get into memory after test:

    After OSR change I get transitions values like after a reset.

    Could you confirm that I use the right way to do, and so that dynamic OSR changes is not supported

    Thanks

  • Hi Zackary, 

    What do you think of the behavior described by Gildas  ?

    Regards

    Geoffrey 

  • Hi Geoffrey, Gildas,

    It sounds like your results are working as expected with the on-the-fly OSR updates, there is nothing explicitely stating that this isn't possible, I would recommend you evaluate the possible OSR settings and ensure that there are no other associated bitfields that may also need to be adjusted to accomodate the given OSR values.

    I would also like to identify if their is a problem with resetting and reconfiguring the entire SDFM module for every OSR transition (so the IP is a known good/ready state)?

    Best Regards,

    Zackary Fleenor

  • Hi Zackary,

    My aim is to evaluate a continuous sigma delta filtering and use the on-the fly OSR update to compensate 20 MHz SD clock drift from an external base clock, so I need to use all the filter's output values and having 2 unusable values after changing OSR is not acceptable

    I've done the same test on AM243x PRU SDFM and as you can see in AM2434: SDFM peripheral - questions - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums the behavior is more like what I expect (even if I stall have driver issue), changing OSR do not reset filter.

    Gildas

  • Hey Gildas,

    AM243x should use the same EQEP peripheral as F28P65x, however the driver implementation my be slightly different. I am still looking into this for you and hope to have more feedback by the end of the week.

    Best Regards,

    Zackary Fleenor

  • Hi Zackary,

    The result I have obtained on AM243x is by manually changing OSR value inside register during a breakpoint. I've done the same test with the workaround provided by Achala wich no more require breakpoint and allow register update by ISR and now, I get the same behaviour with 2 unusable values. I suppose that breakpoint on AM243 do not stop SDFM.

    So there is no more difference between F28P65 and AM243 on SDFM in case of OSR update.

    thanks for your help,

    Gildas

  • Hi Zackary,

    I'm still thinking about dynamic OSR change and need more clarification on what really happened.

    My aim is to have a continuous filtering and to change OSR inside ISR. There could be a few sigma delta input bits between the last bit taken into account for the last sample and the change of the OSR. What happened for these few bits, are they included in the new mesure, or are they trashed and the new mesure restart after OSR change?

    Simple (but not realistic) example to be sure my question is clear : if I start a sinc1 with OSR=32, first sample is computed on bits 1 to 32, second sample on bits 33 to 64, third sample on bits 65 to 96. If I change OSR to 16 in this third ISR, this take me some execution time and when I write the new OSR, current input bit could be the 100. Will the fourth sample be computed on bits 97 to 112 or bits 101 (the one after OSR change) to 116?

    Thanks

    Gildas 

  • Hi Gildas,

    Apologies for the delayed response here. Thank you for providing this description. I am looping in our SDK/API owner to provide additional information regarding this operation. Thanks again for your patience.

    Best Regards,

    Zackary Fleenor

  • Hi Zackary,

    Do you have any updates on this point?

    Regards

  • Hi Zack, 

    Is it possible to provide a feedback to Gildas please? 

    Thank you

    Geoffrey