Cypress技术论坛
直播中

吴帆

7年用户 168经验值
私信 关注
[问答]

LUT处于睡眠模式

你好:
如果在应用中使用LUT和睡眠模式,我该怎么办?没有提供睡眠保护API,对此有什么参考吗?
谢谢
舒尔茨

以上来自于百度翻译


     以下为原文
  Hi:
     What should I do if I use LUT & sleep mode in application?   No sleep saving API is provided,  any reference for this?
     
    Thanks
     
    Schurtz

回帖(5)

郭雨桐

2019-3-22 13:24:39
您是否打算在睡眠模式下使用LUT?或者你想单独使用LUT,只需将PSoC单独入睡。你能详细说明你想用LUT和睡眠模式操作吗?

以上来自于百度翻译


     以下为原文
  Do you intend to use LUT in sleep mode. Or do you intend to use LUT in Active mode alone and just put PSoC alone to sleep. Could you elaborate what you are trying to with LUT and sleep mode operation.
举报

吴帆

2019-3-22 13:37:16
好的,我用LUT驱动LED激活模式。设备将被PICU唤醒,改变LED显示一段时间,然后关闭LED并再次入睡,直到下一次唤醒。
正如我所知道的,UDB配置在睡眠时会丢失,并且在唤醒时应该恢复,我试图明确LUT是否应该以同样的方式。如果是这样,没有LUT配置保存和恢复的引用。
谢谢
舒尔茨

以上来自于百度翻译


     以下为原文
  OK, I use LUT to drive LED in active mode.     Device will be woken up by PICU to change LED display for a while, then turn off LED and go to sleep again until next wakeup.
    As I know, UDB configuration will lost  when sleep, and should be restored when wakeup, I try to make clear whether LUT should be in the same way too. If so, there's none reference for LUT configuration saving & recovery.
    Thanks
    Schurtz
举报

吴帆

2019-3-22 13:52:38
你好:
以上问题有什么反馈吗?
-当设备进入休眠模式时,LUT配置是否会丢失?如果是这样,唤醒时如何恢复呢?
并且说,LUT输出与GPIO输出引脚相连,设备进入休眠模式,如果Lut输出状态丢失,则ToPioOut输出状态也会发生变化,SOI不能期望GPIO将状态保持在睡眠之前。对吗?
谢谢。
B.R.

以上来自于百度翻译


     以下为原文
  Hi:
    Any feedback for the question above?
    -- Whether LUT configuration will lose when device goes to sleep mode?  If so, how to restore it when wakeup?
    -- And say LUT output connected with GPIO output pin,  device goes to sleep mode, if LUT output state lost,  then GPIO output state will changed either, so I can't expect  GPIO keeps the status as before sleep. Is that correct?
    Thanks.
    B.R
举报

陈平

2019-3-22 14:04:15
-当设备进入休眠模式时,LUT配置是否会丢失?如果是这样,唤醒时如何恢复呢?
睡眠的结构不会在睡眠中消失。
并且说,LUT输出与GPIO输出引脚相连,设备进入休眠模式,如果Lut输出状态丢失,则ToPioOut输出状态也会发生变化,SOI不能期望GPIO将状态保持在睡眠之前。对吗?
解决这个问题的方法是用软件重写PIN,强迫它进入特定状态,然后进入睡眠状态。软件状态将通过睡眠保持。当设备唤醒时,将PIN返回控制到硬件。这将防止针上的闪光。
这里是一个将引脚控制到数据寄存器上的例子。
//在这行代码中,我们通过在对应于PIN的位位置写入数据寄存器1来设置PIN高(用您的特定PIN名称替换StaseSnName):
StaseNAMEnEnEdR.Dr=
然后,您需要通过清除旁路位来将PIN控制到数据寄存器。
StasyNAMENEYBYP&
…去睡觉
从睡梦中归来
//返回控制引脚返回到硬件
IsAsNyNAMEYBYP=IsStasyNAME.A掩码;如果您希望在睡眠期间将PIN设为低,则替换
StaseNAMEnEnEdR.Dr=
具有
StaseNAMENAMEDR&AMP:= ~

以上来自于百度翻译


     以下为原文
  -- Whether LUT configuration will lose when device goes to sleep mode?  If so, how to restore it when wakeup?
    The configuration of the LUT will not be lost in sleep.
    -- And say LUT output connected with GPIO output pin,  device goes to sleep mode, if LUT output state lost,  then GPIO output state will changed either, so I can't expect  GPIO keeps the status as before sleep. Is that correct?
                  
     The solution to this is to override the pin with software, force it to a specific state, then enter sleep.  The software state will be retained through sleep.  When the device wakes up, return control of the pin back to the hardware.  This will prevent the glitching on the pin.   
    Here is an example of handing control of the pin over to the data register.
    // In this line of code, we set the pin high by writing a 1 to the data register in the bit position that corresponds to the pin (replace INSTANCE_NAME with your specific pin name):
     INSTANCE_NAME_DR |= INSTANCE_NAME_MASK;
    //Then you need to hand control of the pin over to the data register, by clearing the bypass bit 
    INSTANCE_NAME_BYP &= ~INSTANCE_NAME_MASK;

    … go to sleep

    … return from sleep


    // Return control of the pin back to the hardware


    INSTANCE_NAME_BYP |= INSTANCE_NAME_MASK;
    if you want te have the pin low during sleep, replace
     INSTANCE_NAME_DR |= INSTANCE_NAME_MASK;
    with
     INSTANCE_NAME_DR &= ~INSTANCE_NAME_MASK;
举报

更多回帖

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