2013-11-05 07:51 PM
Hi All,
I am using the demo codes provided for stm32l151xx processor, from here -->http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1295/LN962/PF251642♯
In the keil projct, I am not able to use __asm(''wfi'');It gives this error: &sharp1113: Inline assembler not permitted when generating Thumb code.I also tried &sharppragma arm__asm(''wfi'');&sharppragma thumband adding c compiler options --apcs=/interworkIt gives error: &sharp1114: this feature not supported on target architecture/processor.Note: on Stm32l151xx_IAR it is working fine.Anyone have any ideas? #stm32 #dma #discovery #stm32l2013-11-05 08:13 PM
What version?
__WFI();2013-11-05 08:40 PM
Thanks for the reply,
Did you mean version for KEIL? it is MDK-ARM Basic 4.22my exact board number is stm32l151rct6a,I tried using __WFI(); and it seems to compile the code,Is using this instead of __asm(''wfi''); would create any problems? Please can you share some insights on this.2013-11-05 09:02 PM
It's the CMSIS method provided by STM32L1xx_StdPeriph_Lib_V1.2.0\Libraries\CMSIS\Include\core_cmInstr.h and thus a more platform independent route.
In Keil it uses thehttp://www.keil.com/support/man/docs/armccref/armccref_CJADIFCI.htm
intrinsic