altos: profiling on STM32L
[fw/altos] / src / stm / ao_arch.h
index 484ce89eb5892232e4109ea232a66cffeba3614f..f2de719c6c3c63346ddebd0037aa1a1fcfcc568a 100644 (file)
  * STM32L definitions and code fragments for AltOS
  */
 
-#define AO_STACK_SIZE  668
+#define AO_STACK_SIZE  512
 
 #define AO_LED_TYPE    uint16_t
 
+#ifndef AO_TICK_TYPE
+#define AO_TICK_TYPE   uint16_t
+#define AO_TICK_SIGNED int16_t
+#endif
+
 /* Various definitions to make GCC look more like SDCC */
 
 #define ao_arch_naked_declare  __attribute__((naked))
@@ -138,7 +143,7 @@ extern const uint32_t ao_radio_cal;
 
 
 #define ao_arch_cpu_idle() do {                        \
-               asm("wfi");             \
+               asm(".global ao_idle_loc\n\twfi\nao_idle_loc:");        \
        } while (0)
 
 #define ao_arch_restore_stack() do { \