Commit Graph

637 Commits

Author SHA1 Message Date
Angus Gratton
7c5afa262d deep sleep: Calculate RTC CRC immediately before deep sleep, without using RAM
Fix for issues where RTC FAST memory is updated as part of going into deep
sleep. Very high risk if heaps are in RTC memory - in particular task stacks
may be in RTC memory, but also other variables.

Also fixes potential concurrency problems as RTC FAST memory is not accessible
by CPU during the CRC calculation itself.

Method:
- Disable interrupts (currently for single core only, will need update for S3)
- Load all registers before calculating CRC or going to sleep
2021-02-08 09:59:22 +11:00
morris
87b051c87a mcpwm: fix wrong capture edge 2021-01-27 14:56:33 +08:00
Marius Vikhammer
5e9783f4a6 hal: include pcnt_caps.h
Some HAL files depend on x_caps.h, but didnt explicitly include it

Fixes issue where only 4 PCNT (out of 8) could be used on ESP32

Closes https://github.com/espressif/esp-idf/issues/6366
2021-01-07 03:01:55 +00:00
Angus Gratton
774fb48f9e Merge branch 'bugfix/spiram_reserve_size_pr5373_v4.2' into 'release/v4.2'
SPIRAM reserved memory size fixes (v4.2)

See merge request espressif/esp-idf!11516
2020-12-24 13:55:35 +08:00
Marius Vikhammer
d9cea5dfdb Docs: fix doxygen warnings 2020-12-18 14:27:17 +08:00
negativekelvin
d1a9f9ec74 Fix reserved psram region
Closes https://github.com/espressif/esp-idf/pull/5373

Closes https://github.com/espressif/esp-idf/issues/5821
2020-12-08 17:42:36 +11:00
Angus Gratton
49dde3ca91 Merge branch 'bugfix/cast_int_to_size_t_in_cpu_ll_v4.2' into 'release/v4.2'
soc: cast int to size_t in cpu_ll (v4.2)

See merge request espressif/esp-idf!11135
2020-12-08 09:10:19 +08:00
Darian Leung
a0bb9b2f57 TWAI: ISR runs when cache is disabled
This commit adds the feature where the TWAI ISR will continue to
run even if the cache is disabled. Whilst cache is disabled, any
received messages will go into the RX queue, and any pending TX
messages in the TX queue will be transmitted. This feature should
be enabled using the CONFIG_TWAI_ISR_IN_IRAM option.
2020-12-03 19:41:59 +08:00
Darian Leung
fa7c5fcd42 TWAI: Fix BRP field initialization onf ESP32 ECO3
This commit zero initializes the brp_div field on ESP32 ECO3
to prevent incorrect timing configuration.
2020-12-02 21:27:12 +08:00
Darian Leung
1160da7fdf TWAI: Fix ESP32-S2 register field name 2020-12-02 21:27:12 +08:00
Darian Leung
e1b7a02786 TWAI: Simplify caps header
This commit simplifies the defines made in the _caps.h header. Kconfig
option dependencies were moved into the LL, and the check for a
valid BRP has bee simplified.
2020-12-02 21:26:33 +08:00
FredrikFornstad
57571ae908 Bugfix: Casting int to size_t 2020-11-05 20:32:43 +05:30
Angus Gratton
b336cb954c esp32s2: Disable ADC calibration routine if running on FPGA 2020-11-05 15:06:33 +08:00
ninh
62aade0671 set clk_gate_en when enable rtc gpio wake up 2020-10-28 11:55:49 +08:00
Michael (XIAO Xufeng)
489c0b9aac Merge branch 'feature/esp32s2_bootloader_random_v4.2' into 'release/v4.2'
bootloader_support: Enable RNG entropy source for ESP32-S2 (v4.2)

See merge request espressif/esp-idf!10882
2020-10-22 23:08:11 +08:00
Angus Gratton
b34c658554 esp32s2: Use regi2c registers to enable bootloader RNG 2020-10-21 15:09:22 +11:00
Michael (XIAO Xufeng)
9f0f753a48 Merge branch 'bugfix/fix_i2s_reset_issue_v4.2' into 'release/v4.2'
driver(I2S): Fix I2S reset issue for release/v4.2

See merge request espressif/esp-idf!9582
2020-10-19 15:40:03 +08:00
Angus Gratton
0c320bfb0e esp32s2: Support bootloader_random_enable() 2020-10-19 10:24:37 +11:00
Michael (XIAO Xufeng)
33443d80af Merge branch 'bugfix/spi_master_multiple_dev_with_diff_cs_lvl_4.2' into 'release/v4.2'
spi_master: correctly set cs polarity (4.2)

See merge request espressif/esp-idf!10391
2020-10-17 09:27:24 +08:00
Michael (XIAO Xufeng)
ae0bec8de0 Merge branch 'bugfix/fix_adc-dma_reading_gap_for_esp32_backport_v4.2' into 'release/v4.2'
bugfix(adc): missing ranges of ADC-DMA codes in ESP32 (backport v4.2)

See merge request espressif/esp-idf!10670
2020-10-17 09:21:38 +08:00
Michael (XIAO Xufeng)
189a2991b7 Merge branch 'doc/adc_grammar_stuff_backport_v4.2' into 'release/v4.2'
Bugfix(doc): minor modifications in the adc section  (backport v4.2)

See merge request espressif/esp-idf!10657
2020-10-16 14:42:36 +08:00
fuzhibo
95f353949a bugfix(adc): missing ranges of ADC codes in ESP32 2020-10-16 06:34:46 +00:00
houwenxiang
3fa779b463 driver(I2S): Fix I2S reset issue for release/v4.2
`i2s_start` reseting I2S in incorrect order causeing the word-order error.
2020-10-16 06:32:13 +00:00
Wielebny666
3dd5b574ee spi_master: correctly set cs polarity
All devices must be added to the same spi line before use.
2020-10-16 05:53:24 +00:00
fuzhibo
bbef823a20 feature(rtc): rename i2c_xxx to regi2c_xxx 2020-10-15 03:34:59 +00:00
fuzhibo
d337559a17 rtc: support access internal i2c register 2020-10-15 03:34:59 +00:00
KonstantinKondrashov
be0444bf54 esp32s2/soc: Fix periph_ll_periph_enabled
Logs, before to go the deepsleep, were not completely flushed.
2020-10-01 03:58:23 +08:00
Wu Bo Wen
cb6299200c doc/adc: modifications in the adc documentation and adc headers 2020-09-28 21:55:42 +08:00
Michael (XIAO Xufeng)
a63bdf782f Merge branch 'bugfix/fix_dac_dma_driver_and_ut_backport_v4.2' into 'release/v4.2'
Driver(dac): fix DAC-DMA driver and unit test (backport v4.2)

See merge request espressif/esp-idf!10216
2020-09-28 21:43:11 +08:00
Michael (XIAO Xufeng)
cf16ae573c Merge branch 'cherry-pick-7876d7f5' into 'release/v4.2'
driver(adc): add adc-dma code for esp32   (backport v4.2)

See merge request espressif/esp-idf!10212
2020-09-28 21:11:11 +08:00
Michael (XIAO Xufeng)
847a697c93 Driver(dac): fix DAC-DMA driver and unit test 2020-09-28 19:35:07 +08:00
Michael (XIAO Xufeng)
f3705832fd Merge branch 'bugfix/add_adc-dma_for_esp32' into 'master'
driver(adc): add adc-dma code for esp32

Closes IDF-1407

See merge request espressif/esp-idf!9139

(cherry picked from commit 7876d7f5a6)

bd92e951 driver(adc): add adc-dma code for esp32
2020-08-31 16:29:51 +08:00
morris
c54d599d0d ethernet: set DMA owner after all descriptors have configured 2020-08-20 10:47:08 +08:00
morris
d918e7ad8a ethernet: handle early rx interrupt 2020-08-20 10:47:08 +08:00
dongyou
0b1ef494a7 wifi, bt: move esp_phy_common_clock_disable into periph_ctrl and put it into IRAM
Replace periph_module_enable/disable by periph_wifi_bt_common_module_enable which are in IRAM.
AddIRAM_ATTR periph_ll_wifi_bt_module_enable_clk_clear_rstandIRAM_ATTR periph_ll_wifi_bt_module_disable_clk_set_rstto fit O0 optimization level.
Delete duplicated spinlock and counter.
2020-08-05 14:08:46 +08:00
Angus Gratton
9409b2ecb7 Merge branch 'feature/support_for_esp32_pico_v3_02_v4.2' into 'release/v4.2'
psram: support for esp32-pico-v3-02 (backport v4.2)

See merge request espressif/esp-idf!9787
2020-08-04 14:30:14 +08:00
Michael (XIAO Xufeng)
9dbff45229 Merge branch 'feature/twai_backport_v4.2' into 'release/v4.2'
TWAI: esp32s2 support and multiple bugfixes (backport v4.2)

See merge request espressif/esp-idf!9884
2020-08-03 11:13:20 +08:00
fuzhibo
885f8ce484 driver(adc): esp32s2 support API adc2_vref_to_gpio 2020-07-31 17:52:41 +08:00
Darian Leung
519b8898b3 twai: Fix size of RX msg count field on the esp32
This commit fixes the size of the RX message count register field
on the esp32.
2020-07-30 22:17:14 +08:00
Darian Leung
e6db25af9d TWAI: Add ESP32-S2 support
This commit adds TWAI driver support for the
ESP32-S2. The following features were added:

- Expanded BRP support
- Expanded CLKOUT Divider Support
- Updated example READMEs
2020-07-30 22:09:39 +08:00
fuzhibo
f444d4d2dc driver(adc): fix unit test for ADC-DMA (test_esp32s2.c); fix unit test for ADC-DMA (test_esp32s2.c); fix commit in adc dirver. 2020-07-30 19:38:23 +08:00
fuzhibo
9bc72d5732 driver(touch): fix touch sensor driver redundancy 2020-07-30 11:41:11 +08:00
Michael (XIAO Xufeng)
b284c48854 Merge branch 'bugfix/esp32s2_lightsleep_uart_suspend_v4.2' into 'release/v4.2'
esp32s2: suspend UART output using XOFF before entering light sleep (backport v4.2)

See merge request espressif/esp-idf!9293
2020-07-27 15:55:33 +08:00
chenjianqiang
55a1bd0fb6 feat(esp32): support for esp32-pico-v3-02 2020-07-24 21:20:27 +08:00
Ivan Grokhotkov
3a88ac7900 soc: add periph_ll_periph_enabled to clk_gate_ll.h 2020-07-13 09:52:29 +02:00
Angus Gratton
c44a433b8b driver: Fix some doxygen warnings 2020-07-10 14:53:16 +10:00
fuzhibo
68ed940668 Driver(adc): Disable the synchronization operation function of ADC1 and DAC
Closes IDF-1585
2020-07-01 09:29:34 +00:00
xiongyu
27e6e8c485 bugfix(uart): fix esp32 fifo_cnt bug
When using DPort to read fifo, fifo_cnt is not credible, we need to calculate the real cnt based on the fifo read and write pointer. When using AHB to read FIFO, we can use fifo_cnt to indicate the data length in fifo.
2020-06-16 14:34:23 +08:00
Angus Gratton
baedfab382 Merge branch 'feature/dis_uart_dl_mode' into 'master'
feature: Disable UART download mode

Closes IDF-1386

See merge request espressif/esp-idf!8590
2020-05-29 14:09:54 +08:00
Angus Gratton
59f29cbca8 Merge branch 'feature/allow_rtc_memory_for_task_stacks' into 'master'
Add RTC Fast Memory to Dynamic Memory Pool

See merge request espressif/esp-idf!8390
2020-05-29 14:07:01 +08:00