完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好;
我正在使用SPC570S发现板。我想实现STOP模式以降低功耗,然后使用PA [4]或PC [15]等NMI引脚唤醒。 我已经进入STOP模式但是电路板没有从STOP模式唤醒。程序似乎停止了,然后像这张照片一样显示警告。 然后该模式未被识别。 我的代码附在下面的文件中。 有人可以帮我配置STOP模式的唤醒装置吗? 我很感谢你的帮助。非常感谢。 #wakeup-pin #stop-mode-wake-source#spc570s-disp 以上来自于谷歌翻译 以下为原文 Hello everyone; I am working with SPC570S discovery board. I would like to implement the STOP mode to reduce the power consumption and then wake up by using NMI pin like PA[4] or PC[15]. I already entry the STOP mode however the board does not wake up from STOP mode. The program seems to be halted and then showed a warning like this picture. The mode is then unidentified. My code is attached in the file below. Can someone help me to configure the wake up unit from STOP mode? I am appreciate to your help. Thanks you so much. #wakeup-pin #stop-mode-wake-source #spc570s-disp |
|
相关推荐
10个回答
|
|
LE_SAINT.Erwan
“你能帮我解决这个问题吗? 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 LE_SAINT.Erwan ‌ Can you support me about this problem? Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
你好 ,
根据你的代码: 闪光灯处于低功耗模式.. 你无法访问唤醒功能 也许,你应该把你的功能放在RAM中。 (待机或停止模式)SPC5Studio中有很好的例子: SPC560Dxx用于发现的OS-Less STANDBY SRAM测试应用程序 用于Discovery的SPC560Dxx_RLA WKPU API测试应用程序无法在低功耗模式下进行调试。 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello , According to your code : Flash is in Low power mode ..
you can not access to the Wakeup function Maybe ,you should put your function in RAM. (Standby or Stop Mode) there are nice example in SPC5Studio : SPC560Dxx OS-Less STANDBY SRAM Test Application for Discovery SPC560Dxx_RLA WKPU API Test Application for DiscoveryYou can not debug in Low Power mode. Best regards Erwan |
|
|
|
你好
Yvin.Erwan.001 ?!我看了一些SPC560处理器的例子: SPC560Dxx用于发现的OS-Less STANDBY SRAM测试应用程序 SPC560Dxx_RLA用于发现的WKPU API测试应用程序 我发现SPC560具有唤醒功能的中断向量:[表155:中断向量表] 但是,我没有在SPC570中找到任何软件中断向量。 我应该使用哪个中断在SPC570 MCU中唤醒? 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 Hello Yvin.Erwan.001 ?!I looked at some examples of SPC560 processor: SPC560Dxx OS-Less STANDBY SRAM Test Application for Discovery SPC560Dxx_RLA WKPU API Test Application for Discovery I found that SPC560 has interrupt vectors for the wake up feature: [table 155: Interrupt vector table] However, I havent found any software interrupt vector in SPC570. Which interrupt should I use to wake up in SPC570 MCU? Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
你好Tran,
它与SPC56D不同。 你应该看到第21.3章 你应该在NMI中设置你的打击垫并正确设置NMI配置寄存器 机器检查发生的示例 最好的祝福 二万 以上来自于谷歌翻译 以下为原文 Hello Tran , it is different from SPC56D. you should see the chapter 21.3 you should set your pad in NMI and set correctly the NMI Configuration Register Example for a machine Check Occurrence
Best regards Erwan |
|
|
|
你好
Yvin.Erwan.001 “你的答案和我的期望一样。我使用NMI引脚PC [15]作为唤醒源&lt;参考手册中的第21章&gt; 但是,我不能使用矢量中断IVOR1。查看isor配置文件&lt; ivor_cfg.h&GT; IVOR1_HANDLER始终设置为FALSE: / ** * @brief IVOR1机器检查中断处理程序。 * @details它被设置为@p TRUE,IVOR1中断将被处理调用 *相对回调(即ivor1_callback),传递CSRR0和CSRR1寄存器 *作为参数(分别包含指令地址,与...一样) *可能,设置为正在执行的指令的有效地址 *或即将发生机器检查异常时执行,以及 *中断时的机器状态寄存器)。 * / &amp; sharpdefine IVOR1_HANDLER FALSE =&gt; 1.如何在SPC5studio中更改此IVOR1配置? 在&lt; ivor.s&gt;中文件IVOR1配置为 &amp; sharpif IVOR1_HANDLER .align 4 .globl _IVOR1 .type _IVOR1,@ function _IVOR1: SAVE_CONTEXT_CRITICALLOAD_CSSR0_CSSR1 e_bl _ivor1_callback / *分支到正确的回调* / RESTORE_CONTEXT_CRITICAL se_rfci &安培; sharpendif =&GT; 2.如何配置 &LT; ivor.s&GT;使用IVOR1中断? 非常感谢! 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 Hello Yvin.Erwan.001 ‌Your answer is as same as my expectations. I used NMI pins PC[15] as a wake-up source < Chapter 21 in reference manual>. However, I cannot use vector interrupt IVOR1. Looking at the isor configuration file < ivor_cfg.h> IVOR1_HANDLER is always set FALSE: /** * @brief IVOR1 Machine Check Interrupt Handler. * @details It is set to @p TRUE, IVOR1 interrupt will be handled calling the * relative callback (i.e. ivor1_callback), passing CSRR0 and CSRR1 registers * as parameter (containing respectively, an instruction address, as closely as * possible, set to the effective address of an instruction that was executing * or about to be executed when the Machine Check exception occurred, and * Machine State Register at the time of interrupt). */ &sharpdefine IVOR1_HANDLER FALSE=> 1. How to change this IVOR1 configuration in SPC5studio? In &sharpif IVOR1_HANDLER .align 4 .globl _IVOR1 .type _IVOR1, @function _IVOR1: SAVE_CONTEXT_CRITICALLOAD_CSSR0_CSSR1 e_bl _ivor1_callback /* Branch to the proper callback*/ RESTORE_CONTEXT_CRITICAL se_rfci &sharpendif=> 2. How to configure Thank you so much! Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
嗨Tran,
目前,配置IVOR的图形界面尚未在SPC570S系列上移植。因此,如果您需要使用IVOR1,则需要以下工作方式: 1.在文件ivor_cfg.h中将IVOR1_HANDLER设置为TRUE(请考虑到生成此文件。因此,如果您将重新生成,则修改将丢失,您将不得不重新应用它。) 。在主体中定义函数_ivor1_callback。此函数是IVOR0回调,每次IVOR1发生时都会执行。 如有任何其他说明,请随时与我们联系。 问候, 路易吉 以上来自于谷歌翻译 以下为原文 Hi Tran, currently the graphic interface to configure the IVOR has not been ported yet on the SPC570S family. So, if you need to use the IVOR1, the following workarond is needed: 1. Set IVOR1_HANDLER to TRUE in the file ivor_cfg.h (please, take into account that this file is generated. So, if you will re-generate, the modification will be lost and you will have to re-apply it).2. Define in your main the function _ivor1_callback. This function is the IVOR0 callback and will be exectute each time an IVOR1 will occur. Please, feel free to contact us for any other clarification. Regards, Luigi |
|
|
|
你好
Zambrano.Luigi ?非常感谢你的指导。 我按照你的步骤通过IVOR1创建了中断,但它还没有奏效。 我的代码可简要描述如下: 1)将PC [15],PA [4]配置为NMI引脚 2)在RAM中添加函数gotoRunMode()和gotoStandbymode [quote] Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
2)在RAM中添加函数gotoRunMode()和gotoStandbymode
3)配置唤醒引脚 4.中断处理程序ivor1 void _ivor1_callback(void) { gotoRunMode(); } =&GT; 1.当NMI引脚改变其状态(0-> 1)时,我看到寄存器WKPU.NSR不是改变状态。 2.中断处理ivor1不起作用。 详细程序保存在下面链接的附件中 =&GT;你能一次看我的代码吗? https://drive.google.com/open?id=1CboTw1KvDvnVSOaQwzxYvjLkSPWuKhE4 以上来自于谷歌翻译 以下为原文 2) Add function gotoRunMode() and gotoStandbymode in RAM 3) Configure wakeup pin 4. interrupt handler ivor1 void _ivor1_callback (void) { gotoRunMode(); }=> 1. I see that register WKPU.NSR is not change status when NMI pin change its state (0->1). 2. interrupt hander ivor1 doesnt work. The detail program is saved in the attached file in the link below => Can you look at my code one time? https://drive.google.com/open?id=1CboTw1KvDvnVSOaQwzxYvjLkSPWuKhE4 |
|
|
|
嗨Tran,
在附件中,您可以找到有关如何使用SPC570S Discovery上的唤醒单元生成IVOR1的示例。执行它需要以下步骤: 1.在SPC5Studio中导入项目 2. Generare 3.应用我建议您启用IVOR 1的变通方法(在ivor_cfg.h文件中将宏IVOR0_HANDLER设置为TRUE) 4.编译项目并在板上闪烁 5.将引脚C26(连接器X3)连接到电路板上可用的三个按钮之一(例如,使用SW1)。引脚C26与内核的引脚PA [4]连接,该引脚已在功能NMIPinConfig()内配置为NMI。 6.执行应用程序 您应该看到LED1-3闪烁。现在,如果按下SW1按钮,将生成IVOR1并且执行应保持在IVOR1回调函数(_ivor1_callback)中的while(1)循环内。 如果这个例子澄清了唤醒单元的用法,请告诉我。 问候, 路易吉 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 Hi Tran, In attachment you can find an example on how to use the Wakeup Unit on SPC570S Discovery to generate a IVOR1. The following steps are needed to execute it: 1. Import the project in SPC5Studio 2. Generare 3. Apply the workaround that I suggested you to enable the IVOR 1 (setting the macro IVOR0_HANDLER on TRUE in the file ivor_cfg.h) 4. Compile the project and flash it on the board 5. Connect the pin C26 (connector X3) with one of the three push buttons available on the board (for example, with the SW1). The pin C26 is connected with the pin PA[4] of the core, that has been configured as NMI within the function NMIPinConfig(). 6. Execute the application You should see LED1-3 blinking. Now, if you push the button SW1, an IVOR1 will be generated and the execution should remain within the while(1) loop in the IVOR1 callback function (_ivor1_callback). Please, let me know if this example has clarified the usage of the Wakeup Unit. Regards, Luigi Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
你好@Nickname4197(ST员工)@Erwan YVIN(ST员工)!
-------------------------------------------------- -------------------------------------------- 我有一个关于eTimer PWM的问题。 我尝试将eTimer_0 ETC_4配置为eTimer 3的源FAULT_0.PA [13]被指定为外部输入故障源。我的配置代码如下: void etimer_config() { ETIMER_0.CH [4] .CNTR.R = 1000; ETIMER_0.CH [4] .CTRL1.B.CNTMODE = 0x6U; / *辅助源边缘触发主要计数直到比较* / ETIMER_0.CH [4] .CTRL1.B.PRISRC = 0x18U; / *主要计数源= IP总线时钟/ 2 * / ETIMER_0.CH [4] .CTRL1.B.SECSRC = 0x4U; / *计数器#4输入引脚etimer0.ch [4] / PA [13] * / ETIMER_0.CH [4] .CTRL1.B.ONCE = 0U; / *重复计数* / ETIMER_0.CH [4] .CTRL1.B.LENGTH = 0U; / *计算直到滚动* / ETIMER_0.CH [4] .CTRL1.B.DIR = 0U; /* 计数 */ ETIMER_0.CH [4] .CTRL2.B.OEN = 0U; / *输出禁用* / ETIMER_0.CH [4] .CTRL2.B.RDNT = 0U; / *禁用冗余通道* / ETIMER_0.CH [4] .CTRL2.B.INPUT = 0x1U; / *外部输入信号启用* / ETIMER_0.CH [4] .CTRL2.B.SIPS = 0x1; / *重新计算的正边缘* / ETIMER_0.CH [4] .CTRL3.B.FMODE = 1; / *改变模式* / ETIMER_0.CH [4] .CTRL3.B.FDIS = 1; / *通道OFLAG输出受此FAULT引脚的影响。 * / ETIMER_0.CH [4] .FILT.B.FILT_CNT = 7; / *样本过滤计数器* / ETIMER_0.CH [4] .FILT.B.FILT_PER = 255; / *输入过滤期* / ETIMER_0.CH [4] .CCCTRL.B.CPT2MODE = 0x2U; / *捕获2模式控制* / ETIMER_0.CH [4] .CCCTRL.B.CPT1MODE = 0x2U; / *捕获1模式控制* / ETIMER_0.CH [4] .CCCTRL.B.CFWM = 0x1U; / * FIFO = 2 * / } void FAULT_PIN_Configure() { SIUL2.MSCR_MUX [206] .R = 0x1U; } 当该程序运行时,eTimer_3的PWM已经禁用,但是当故障引脚PA [13]改变状态时它被启用。你能查看一下我的配置吗? 以上来自于谷歌翻译 以下为原文 Hello @Nickname4197 (ST Employee) @Erwan YVIN (ST Employee) ! ---------------------------------------------------------------------------------------------- I have a question about eTimer PWM. I tried to configure eTimer_0 ETC_4 as a source FAULT_0 for eTimer 3. The PA[13] is assigned as an external input fault source. My configuration code is below: void etimer_config () { ETIMER_0.CH[4].CNTR.R = 1000; ETIMER_0.CH[4].CTRL1.B.CNTMODE = 0x6U; /* Edge of secondary source triggers primary count till compare */ ETIMER_0.CH[4].CTRL1.B.PRISRC = 0x18U; /* primary count source = IP bus clock/2 */ ETIMER_0.CH[4].CTRL1.B.SECSRC = 0x4U; /* Counter #4 input pin etimer0.ch[4]/ PA[13] */ ETIMER_0.CH[4].CTRL1.B.ONCE = 0U; /* count repeatedly */ ETIMER_0.CH[4].CTRL1.B.LENGTH = 0U; /* count until rolling over */ ETIMER_0.CH[4].CTRL1.B.DIR = 0U; /* count up */ ETIMER_0.CH[4].CTRL2.B.OEN = 0U; /* output disable */ ETIMER_0.CH[4].CTRL2.B.RDNT = 0U; /* disable redundant channel */ ETIMER_0.CH[4].CTRL2.B.INPUT = 0x1U; /* External input signal enable*/ ETIMER_0.CH[4].CTRL2.B.SIPS = 0x1; /* Positive edge for recounting*/ ETIMER_0.CH[4].CTRL3.B.FMODE = 1; /* change mode */ ETIMER_0.CH[4].CTRL3.B.FDIS = 1; /* The channel OFLAG output is affected by this FAULT pin. */ ETIMER_0.CH[4].FILT.B.FILT_CNT = 7; /* sample filter counter*/ ETIMER_0.CH[4].FILT.B.FILT_PER = 255; /* input filter period */ ETIMER_0.CH[4].CCCTRL.B.CPT2MODE = 0x2U; /*Capture 2 Mode Control*/ ETIMER_0.CH[4].CCCTRL.B.CPT1MODE = 0x2U; /*Capture 1 Mode Control*/ ETIMER_0.CH[4].CCCTRL.B.CFWM = 0x1U; /*FIFO = 2*/ } void FAULT_PIN_Configure () { SIUL2.MSCR_MUX[206].R = 0x1U; } When this program operates, the PWM of eTimer_3 already disable, but it is enable when the fault pin PA[13] change the state. Can you review my configuration? |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2724 浏览 1 评论
3237 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3646 浏览 6 评论
6034 浏览 21 评论
1336浏览 4评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
268浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 10:15 , Processed in 1.439851 second(s), Total 95, Slave 79 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号