<div dir="ltr"><div dir="ltr"><div>yes, I need to do low power for stm32f4</div><div>will this line work __asm__ volatile ("wfi");?</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 23, 2019 at 10:28 PM Christian Mauderer <<a href="mailto:christian.mauderer@embedded-brains.de">christian.mauderer@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 22.04.19 um 09:47 schrieb Jython:<br>
> HI, ALL!<br>
> wfi <a href="http://www.keil.com/support/man/docs/armcc/armcc_chr1359125004400.htm" rel="noreferrer" target="_blank">http://www.keil.com/support/man/docs/armcc/armcc_chr1359125004400.htm</a><br>
> how can i call the arm __wfi?<br>
> <br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
> <br>
<br>
Hello Jython,<br>
<br>
WFI is an assembler instruction. The Keil wrapper isn't available in<br>
gcc. I know of no direct replacement. Most likely you need a gcc inline<br>
assembly for that.<br>
<br>
May I ask why you would need "wfi"? If you use a operating system, the<br>
system typically handles such low level stuff for you. The only<br>
application that springs to mind for that instruction is overwriting the<br>
idle loop to save energy.<br>
<br>
Best regards<br>
<br>
Christian<br>
<br>
-- <br>
--------------------------------------------<br>
embedded brains GmbH<br>
Herr Christian Mauderer<br>
Dornierstr. 4<br>
D-82178 Puchheim<br>
Germany<br>
email: <a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
Phone: +49-89-18 94 741 - 18<br>
Fax: +49-89-18 94 741 - 08<br>
PGP: Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</blockquote></div>