ST意法半导体
直播中

陈键

7年用户 1004经验值
擅长:可编程逻辑 电源/新能源
私信 关注
[问答]

STSW-IMG035主机MCU上的最低资源要求是什么?

大家好,
我想知道在主机 MCU 上运行 TouchLessControl 库 (STSW-035) 库的典型资源要求(主要需要计算能力/DMIPS 值)。  
GestureEVK-UM.pf提到了典型的 RAM 和闪存占用空间:

我知道该库也可用于 Cortex-M0 ...
但是我找不到运行 STSW-035 软件堆栈所需的 (D)MIPS 的最大使用情况。
即使由于将 DMIPS 映射到现实世界的算法可能很难给出准确的值——有中断、DMA、外围设备、RTOS……——指示​​性 DMIPS 范围将非常有帮助。







回帖(1)

凌章致

2022-12-1 15:52:53
这是一个棘手的问题。
但是最大的时间开销是I2C流量。您将需要传输 64 个 16 位距离、64 个 32 位信号强度、64 个 8 位目标编号和 64 个 8 位状态值。每秒有 15 个。
所以记住这一点。
但我不想给你一个数字,而是想给你一些代码。
找出要测量的位置并添加代码。
如果您使用 STSW-IMG035_F401,它的运行频率为 84MHz,
我知道我让你做这项工作。但是这个技巧大家应该都知道。


  • 约翰



  • Just add these defines in your code and then the functions.  Simply call the stopwatch_reset to both enable the counter and it resets it to 0.  Then do the stopwatch_getticks to get the current value.  I also add in my watch expressions the *0xE0001004, so if I put in a break point, I can see the current value of the counter.

  • // Defines to be added
  • #define DEMCR_TRCENA    0x01000000

  • /* Core Debug registers */
  • #define DEMCR           (*((volatile uint32_t *)0xE000EDFC))
  • #define DWT_CTRL        (*(volatile uint32_t *)0xe0001000)
  • #define CYCCNTENA       (1<<0)
  • #define DWT_CYCCNT      ((volatile uint32_t *)0xE0001004)
  • #define CPU_CYCLES      *DWT_CYCCNT

  • // Functions to be added.
  • static inline void stopwatch_reset(void)
  • {
  •     /* Enable DWT */
  •     DEMCR |= DEMCR_TRCENA;
  •     *DWT_CYCCNT = 0;
  •     /* Enable CPU cycle counter */
  •     DWT_CTRL |= CYCCNTENA;
  • }

  • static inline uint32_t stopwatch_getticks(void)
  • {
  •     return CPU_CYCLES;
  • }

举报

更多回帖

发帖
×
20
完善资料,
赚取积分