Skip to main content
Associate III
August 25, 2016
Question

STM32F7 fast threshold implimintation

  • August 25, 2016
  • 2 replies
  • 520 views
Posted on August 25, 2016 at 10:39

Hi,

I have a 800 bytes array and I need to check if each byte is bigger than a threshold value

for (i=0;i<800;i++)

if Data[i] > TH

then ....

is there any other method to implement this threshold without loop and if?

Thanks,

Michael
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    August 25, 2016
    Posted on August 25, 2016 at 19:56

    Review the ARM Cortex-M7 TRM and the SIMD features supported.

    At some level you're going to have to walk over the data, the question is the stride size, this isn't some magic CISC implementation, very little silicon is wasted on features with minimal usage. Suggest you start by unrolling the loop, and learning assembler.

     

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    privenAuthor
    Associate III
    August 30, 2016
    Posted on August 30, 2016 at 14:44

    Tnx, will try