Commit Graph

444 Commits

Author SHA1 Message Date
Dan Halbert
8061a2574d
Merge branch 'main' into pin_alarm 2020-12-23 22:05:02 -05:00
Scott Shawcroft
1fca297a2d
A couple sleep fixes
* Better messaging when code is stopped by an auto-reload.
* Auto-reload works during sleeps on ESP32-S2. Ticks wake up the
  main task each time.
* Made internal naming consistent. CamelCase Python names are NOT
  separated by an underscore.
2020-12-22 16:13:02 -08:00
Jeff Epler
da8f023665 esp32s2: make flash: use the stub
Very long ago, this was apparently not supported in esptool yet, at
least when operating over USB CDC.  This now works just fine, and
our esp webtool relies on it as well.  It makes flashing faster,
too.
2020-12-22 10:27:42 -06:00
Dan Halbert
d4e9eea397
mark alarm.wake_alarm during gc sweep 2020-12-22 08:11:01 -08:00
Dan Halbert
d6df43b943
Merge pull request #3863 from dhalbert/adafruit-prefix
Add Adafruit to MICROPY_HW_BOARD_NAME for various boards
2020-12-22 08:02:35 -05:00
Dan Halbert
39ca406a31 Add Adafruit to MICROPY_HW_BOARD_NAME for various boards 2020-12-21 23:32:11 -05:00
microDev
4512290ba0
Merge branch 'main' into ota-s2 2020-12-18 00:44:00 +05:30
microDev
4863413bc9
rename ota to dualbank 2020-12-18 00:34:56 +05:30
Scott Shawcroft
0dcc659d53
Swap to IDF release/4.2 branch for stability 2020-12-15 18:12:59 -08:00
Scott Shawcroft
1ad49d9a18
Add alarm.pin that wakes on pin level
Fixes #3787
2020-12-15 18:12:59 -08:00
hierophect
3ad4b12ce1
Merge branch 'main' into esp-analog-hang 2020-12-15 15:08:30 -05:00
Scott Shawcroft
d076296659
Merge pull request #3816 from dhalbert/sleepmemory
alarm.sleep_memory + alarm.wake_alarm
2020-12-14 17:40:02 -08:00
Scott Shawcroft
d6ee17c6fd
Merge pull request #3817 from BennyE/reserve-pins-only-for-debug
esp32s2: Reserve UART pins only if DEBUG=1 is set to address issue 3811
2020-12-14 17:32:17 -08:00
Scott Shawcroft
a1f773d9ed
Merge pull request #3819 from BennyE/issue3663
Fix for issue 3663 by returning early if no scan was started before s…
2020-12-14 17:11:18 -08:00
Scott Shawcroft
dc473b29e3
Merge pull request #3643 from hierophect/esp32-pin-reset
ESP32-S2: Add IDF pin resets to Microcontroller
2020-12-14 17:09:29 -08:00
Lucian Copeland
d793ec2872 Change pinfunc to default of 0 at reset 2020-12-14 14:25:38 -05:00
Lucian Copeland
cac755ba16 Merge remote-tracking branch 'upstream/main' into esp-analog-hang 2020-12-14 13:00:57 -05:00
Lucian Copeland
f15e2d86c0 Reduce samples from 64 to 2 2020-12-14 12:59:20 -05:00
Dan Halbert
e0afa32cfa use RTC_DATA_ATTR; address review comments 2020-12-14 11:36:54 -05:00
microDev
37ee5e683d
Merge branch 'main' into ota-s2 2020-12-12 05:25:46 +05:30
BennyE
c5c13620f2 Fix for issue 3663 by returning early if no scan was started before stop is issued 2020-12-12 00:49:53 +01:00
BennyE
81c4871fdf Set DEBUG CFLAG if set in make 2020-12-11 22:11:39 +01:00
BennyE
e3194ad54e Reserve UART pins only if DEBUG=1 is set to address issue 3811 2020-12-11 20:35:28 +01:00
Dan Halbert
cf938983e9 SleepMemory + set alarm.wake_alarm 2020-12-11 08:10:26 -05:00
microDev
cb35abfd04
add docs, update translation & fix ota.flash() 2020-12-11 01:01:01 +05:30
Dan Halbert
55f4110983 fix typo 2020-12-10 14:16:25 -05:00
Dan Halbert
5964163649 Initial SleepMemory code 2020-12-10 13:03:40 -05:00
microDev
6a4f74946f
reset ota module on every vm run 2020-12-10 16:48:58 +05:30
microDev
07015ad527
add ability to switch boot partition 2020-12-10 16:42:45 +05:30
microDev
bfa2c604ef
add ability to flash in discontinuous chunks 2020-12-10 15:45:25 +05:30
microDev
ed5add37f6
add ability to flash in continuous chunks 2020-12-10 14:36:49 +05:30
microDev
dee86a014b
factor out esp_ota_end 2020-12-10 14:04:24 +05:30
microDev
20c3184c87
re-organize and clean-up 2020-12-10 12:34:56 +05:30
Scott Shawcroft
e14b148e62
Merge pull request #3803 from skieast/fix_i2c_hang_with_wifi
Working, tested with two i2c busses
2020-12-09 10:03:31 -08:00
Scott Shawcroft
133013083a
Merge pull request #3808 from tannewt/panic_safe_mode
Enter safe mode after panic or brownout
2020-12-08 16:31:22 -08:00
Scott Shawcroft
57101d7da6
Merge pull request #3807 from tannewt/sleep_tweaks
Add `board_deinit` for use with sleep
2020-12-08 16:30:41 -08:00
Lucian Copeland
9a5006e241 Remove problematic calloc 2020-12-08 17:43:39 -05:00
Scott Shawcroft
0b4bcd9599
Fix build and more comments 2020-12-08 13:05:21 -08:00
Scott Shawcroft
d0a806d797
Enter safe mode after panic or brownout
Uses the IDF's reset reason. Does nothing before reset.

Fixes #3389
2020-12-08 11:03:24 -08:00
Scott Shawcroft
40118bcf57
Add board_deinit for use with sleep
This changes lots of files to unify `board.h` across ports. It adds
`board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to
deinit the board before deep sleeping (even when pretending.)

Deep sleep is now a two step process for the port. First, the
port should prepare to deep sleep based on the given alarms. It
should set alarms for both deep and pretend sleep. In particular,
the pretend versions should be set immediately so that we don't
miss an alarm as we shutdown. These alarms should also wake from
`port_idle_until_interrupt` which is used when pretending to deep
sleep.

Second, when real deep sleeping, `alarm_enter_deep_sleep` is called.
The port should set any alarms it didn't during prepare based on
data it saved internally during prepare.

ESP32-S2 sleep is a bit reorganized to locate more logic with
TimeAlarm. This will help it scale to more alarm types.

Fixes #3786
2020-12-08 10:52:25 -08:00
microDev
2f95c94ad8
esp32s2 - update common_hal_mcu_reset 2020-12-08 18:00:58 +05:30
microDev
602243748b
add ota support for esp32s2 2020-12-08 11:45:00 +05:30
microDev
fc23a0cc8a
implement ota module 2020-12-08 11:30:00 +05:30
Bruce Segal
571c063c2a Working, tested with two i2c busses 2020-12-07 17:57:54 -08:00
Scott Shawcroft
44b56f76c4
Store safe mode state in the RTC.
Also print backtrace before reset when DEBUG. This will help debug
safe mode issues which calls reset.
2020-12-07 16:39:54 -08:00
Scott Shawcroft
22ad76bb48
Merge pull request #3800 from BennyE/wifi-better-logs
Enhance debug log for wifi scan, sta_start, sta_stop
2020-12-07 12:32:15 -08:00
Lucian Copeland
c1a2ea27ce Change to config-based resets 2020-12-07 13:57:47 -05:00
Lucian Copeland
c7b5928833 Fix submodule desync 2020-12-07 11:47:39 -05:00
Lucian Copeland
40a536904f Merge remote-tracking branch 'upstream/main' into esp32-pin-reset 2020-12-07 11:45:27 -05:00
Dan Halbert
169b487509 Include wifi.radio singleton in gc 2020-12-07 11:07:56 -05:00