first working prototype of freezing micro in STOP2

pull/7/head
Mateusz Lubecki 2021-08-23 21:20:38 +02:00
rodzic 13de42e7e0
commit d12b2c4dae
3 zmienionych plików z 13 dodań i 4 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType">
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;peripherals&gt;&#10; &lt;peripheral name=&quot;RTC&quot;/&gt;&#10; &lt;peripheral name=&quot;FLASH&quot;/&gt;&#10; &lt;peripheral name=&quot;SCB&quot;/&gt;&#10; &lt;peripheral name=&quot;DBGMCU&quot;/&gt;&#10; &lt;peripheral name=&quot;EXTI&quot;/&gt;&#10; &lt;peripheral name=&quot;PWR&quot;/&gt;&#10; &lt;peripheral name=&quot;USART2&quot;/&gt;&#10;&lt;/peripherals&gt;&#10;"/>
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.PERIPHERALS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;peripherals&gt;&#10; &lt;peripheral name=&quot;RTC&quot;/&gt;&#10; &lt;peripheral name=&quot;FLASH&quot;/&gt;&#10; &lt;peripheral name=&quot;DBGMCU&quot;/&gt;&#10; &lt;peripheral name=&quot;EXTI&quot;/&gt;&#10; &lt;peripheral name=&quot;PWR&quot;/&gt;&#10; &lt;peripheral name=&quot;USART2&quot;/&gt;&#10; &lt;peripheral name=&quot;SCB&quot;/&gt;&#10;&lt;/peripherals&gt;&#10;"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="true"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/>
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="true"/>

Wyświetl plik

@ -87,6 +87,14 @@ void RTC_WKUP_IRQHandler(void) {
RTC->ISR &= (0xFFFFFFFF ^ RTC_ISR_WUTF_Msk);
EXTI->PR1 |= EXTI_PR1_PIF20;
system_clock_configure_l4();
led_flip_led1_upper();
led_flip_led2_bottom();
led_control_led1_upper(true);
}
#endif
@ -199,7 +207,7 @@ void TIM7_IRQHandler(void) {
// io_ext_watchdog_service();
AdcValue = (short int)(( AdcBuffer[0] + AdcBuffer[1] + AdcBuffer[2] + AdcBuffer[3]) >> 1);
AFSK_ADC_ISR(&main_afsk, (AdcValue - 4095) );
led_control_led1_upper(main_ax25.dcd);
led_control_led1_upper(main_ax25.dcd); // TODO
ASC = 0;
if (ASC2++ == 2) {

Wyświetl plik

@ -87,9 +87,10 @@ void pwr_save_enter_stop2(void) {
DBGMCU->CR &= (0xFFFFFFFF ^ (DBGMCU_CR_DBG_SLEEP_Msk | DBGMCU_CR_DBG_STOP_Msk | DBGMCU_CR_DBG_STANDBY_Msk));
// disabling all IRQs
__disable_irq();
//__disable_irq();
asm ("wfe");
asm("sev");
asm("wfi");
}