Commit Graph

91 Commits

Author SHA1 Message Date
songruojing
b1017de2e6 gpio: Fix some gpio pin num errors on esp32s2 and esp32c3 2022-02-10 20:27:43 +08:00
Armando
b3c51e74c8 spi_master: fix spi cs_ena_posttrans issue 2022-02-07 12:22:15 +08:00
Gustavo Henrique Nihei
880e96d7bb spi: Ensure DMA In-Link EOF is generated by trans_done on SPI Slave 2021-11-25 12:03:55 +08:00
Gustavo Henrique Nihei
2bc4a0836f spi: Remove Slave TX/RX set bitlen not effective for ESP32-S2/C3/S3
Furthermore, RX_EOF_EN should only be set when SPI Slave is configured
for segment transfer mode and the "ms_data_bitlen" field is configured
to control the "IN_SUC_EOF" interrupt. Since "ms_data_bitlen" is not
set anymore for S2, C3 and S3, "RX_EOF_EN" should be cleared.
2021-11-25 12:03:54 +08:00
Jiang Jiang Jian
b1290591df Merge branch 'bugfix/register_non_32bit_access_v4.3' into 'release/v4.3'
hal: avoid non-32bit access to registers (v4.3)

See merge request espressif/esp-idf!15616
2021-11-23 07:09:41 +00:00
Marius Vikhammer
79b59947d8 aes: fix potential unaligned access of buffers
https://github.com/espressif/esp-idf/issues/7236
2021-11-04 10:35:55 +08:00
morris
62bd98158f hal: avoid non-32bit access to registers 2021-10-25 11:33:50 +08:00
Michael (XIAO Xufeng)
14977d7561 Merge branch 'bugfix/spi_ll_intr_bits_v4.3' into 'release/v4.3'
spi: Fix wrong target register for interrupt disable (v4.3)

See merge request espressif/esp-idf!14404
2021-10-16 16:18:10 +00:00
Cao Sen Miao
ce9e615679 Merge branch 'feature/esp32c3_usbjtagserial_v4.3' into 'release/v4.3'
usb_serial_jtag: support usb_serial_jtag on esp32c3(backport v4.3)

See merge request espressif/esp-idf!15319
2021-10-14 10:38:02 +00:00
SalimTerryLi
29accf2533 soc/ll: workaround compiler bug that generate 8/16 bits inst instead of 32 bits one
Note: on ESP32 UART rxfifo seems to be read as u8 instead of u32 to make it work
2021-10-12 10:42:04 +08:00
Jeroen Domburg
d6cdb3e0ae usb_serial_jtag: support usb_serial_jtag on esp32c3
USB serial/jtag controller: Add vfs (logging/printf), panic handler, gdb support.

See merge request espressif/esp-idf!12925
2021-10-11 17:34:24 +08:00
Cao Sen Miao
cbfa3eb350 gpio: fix issue that gpio cannot hold during deep-sleep on c3, Closes https://github.com/espressif/esp-idf/issues/7455 2021-10-08 19:56:14 +08:00
Gustavo Henrique Nihei
de1a4f0c0d spi: Fix wrong target register for interrupt disable 2021-07-30 13:55:08 +08:00
Wangjialin
427fe1bcde uart: fix esp32c3 uart output garbage value after resetting 2021-07-21 15:31:50 +08:00
Sachin Parekh
47c728adf0 esp32c3/memprot: Correct the split line address calculation 2021-07-15 10:57:18 +05:30
Sachin Parekh
65b9f87998 esp32c3/memprot: Fix incorrect access to DRAM0 split line registers
memprot_ll_set_dram0_split_line_* and memprot_ll_get_dram0_split_line_* APIs were accessing
incorrect configuration register
2021-07-15 10:57:18 +05:30
Cao Sen Miao
9c7d2c7595 spi_flash: fix cs line setup to make the flash driver more stable 2021-06-15 15:27:51 +08:00
Marius Vikhammer
38aa99d63d soc: merge C3 caps into a single soc_caps.h 2021-05-11 15:20:54 +08:00
Michael (XIAO Xufeng)
52d9d466fb Merge branch 'ci/enable_i2c_test_v4.3' into 'release/v4.3'
I2C: enable all unit test for i2c on esp32c3 (backport 4.3)

See merge request espressif/esp-idf!13061
2021-04-28 15:00:20 +00:00
Cao Sen Miao
ba1ce2ebd0 I2C: enable all unit test for i2c on esp32c3 2021-04-27 17:13:47 +08:00
Darian Leung
07291fdd27 TWAI: FIFO overrun handling and errata workarounds
This commit adds handling for FIFO overruns and
adds workarounds for HW errats on the ESP32.

Closes https://github.com/espressif/esp-idf/issues/2519
Closes https://github.com/espressif/esp-idf/issues/4276
2021-04-26 19:35:13 +08:00
Omar Chebib
84dc42c4b0 gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3
When `DIS_USB_JTAG` eFuse is NOT burned (`False`), it is not possible
to set pins 18 and 19 as GPIOs. This commit solves this by manually
disabling USB JTAG when using pins 18 or 19.
The functions shall use `gpio_hal_iomux_func_sel` instead of
`PIN_FUNC_SELELECT`.
2021-04-12 17:45:06 +08:00
Martin Vychodil
6dfff2fdbd esp32c3: memprot API upgrade and test application
Closes IDF-2641
2021-04-12 10:21:58 +10:00
Armando
f48346f22f adc: apply adc power API to adc driver 2021-03-26 17:41:20 +08:00
Armando
8fe99aff96 adc: add implementation of missed public API
Added ``adc1_pad_get_io_num``, ``adc2_pad_get_io_num`` and
``adc_vref_to_gpio``.
2021-03-26 13:26:19 +08:00
Armando
f1be501271 adc: refactor adc single read api on esp32c3 2021-03-26 13:26:19 +08:00
Armando
f25c996b06 adc: remove unused functions on esp32c3 2021-03-26 13:26:18 +08:00
Michael (XIAO Xufeng)
7dca6b7428 uart: fixed incorrect baudrate on C3 and S3 when target is too slow
The integer part of the divider is only 12-bit now. We used prescaler to get low frequency instead.
2021-03-10 13:41:10 +08:00
Cao Sen Miao
198d350fe5 esp_system: support gpio wakeup from deep sleep on esp32c3 2021-02-26 17:08:22 +08:00
Cao Sen Miao
e38326d715 spi_flash: fix the issue that ext flash hold is not controlled properly 2021-02-04 14:44:51 +08:00
Ivan Grokhotkov
bb1f75179b Merge branch 'bugfix/freertos_systimer_stall_when_cpu_halted' into 'master'
freertos: stall systimer while CPU is in debug mode

See merge request espressif/esp-idf!12063
2021-01-29 07:02:30 +08:00
Martin Vychodil
69096ddce5 Security: ESP32C3 memory protection feature (IRAM0/DRAM0)
Software support for PMS module.
Allows controlled memory access to IRAM (R/W/X) and DRAM0 (R/W)
On/locked by default, configurable in Kconfig (esp_system)

Closes https://jira.espressif.com:8443/browse/IDF-2092
2021-01-27 08:44:03 +01:00
Michael (XIAO Xufeng)
c99e891201 Merge branch 'feature/sync_adc_changes_from_c3_to_master_last' into 'master'
adc: sync adc changes from c3 to master (last time)

Closes IDF-2694

See merge request espressif/esp-idf!12134
2021-01-26 12:52:20 +08:00
Michael (XIAO Xufeng)
2b83418141 adc: add fallback calibration method
Also:
1. Separate static configuration into init phase to improve
performance
2. Add a init code config layer to avoid duplicated configuration
3. Add a HW_CALIBRATION_V1 caps
2021-01-25 20:30:42 +08:00
Michael (XIAO Xufeng)
7a20ea5f0e Merge branch 'feature/support_flash_sus_res_c3' into 'master'
spi_flash: Add flash auto-suspend auto-resume mode on esp32c3

Closes IDF-2591

See merge request espressif/esp-idf!11888
2021-01-25 17:41:32 +08:00
Michael (XIAO Xufeng)
3d7da2c8ff adc: simplify LL on C3 2021-01-25 15:08:55 +08:00
Armando
d8a4b247b9 adc_digi: update_adc_api_for_5M_freq_limit
The ``adc_digi_config_t`` struct is modified on esp32c3: configuration
of clock divider factors are not provided anymore. The SARADC sampling
frequency is provided instead. In this way, we can handle the frequency
limit better.
2021-01-25 04:51:40 +00:00
Michael (XIAO Xufeng)
56919682be adc: remove useless adc_ll_set_sar_clk_div in LL 2021-01-25 04:51:40 +00:00
Michael (XIAO Xufeng)
90fc3e7030 adc: update the monitor and filter in the HAL on C3
On C3 ADC has no enable bit for monitor and filter. However we can use context variables to implement one
2021-01-25 04:51:40 +00:00
fuzhibo
19fb11549b driver(adc): update adc ll and hal driver for esp32c3 2021-01-25 04:51:40 +00:00
Armando
02600309c8 adc: fix some regression issues 2021-01-25 04:51:40 +00:00
Michael (XIAO Xufeng)
d7d1dee208 system: reset dma when soft reset 2021-01-25 04:51:40 +00:00
Armando
d35173c147 small fix for cherrypick 2021-01-25 04:51:40 +00:00
Armando
b38f4646de adc_digi: add dma drivers 2021-01-25 04:51:40 +00:00
Cao Sen Miao
9905da46e0 spi_flash: Add auto suspend mode on esp32c3 2021-01-25 11:14:02 +08:00
Ivan Grokhotkov
d7bac619ec freertos: stall systimer while CPU is in debug mode 2021-01-24 11:32:17 +00:00
Michael (XIAO Xufeng)
06f22fc4b0 Merge branch 'feature/new_restart_mode_driver_and_ut_for_spi_slave_hd' into 'master'
spi_slave_halfduplex: append mode driver

See merge request espressif/esp-idf!10845
2021-01-24 09:27:12 +08:00
Armando
0538dc2d93 spi_slave_hd: add DMA Append Mode feature 2021-01-21 18:53:53 +08:00
Jiang Jiang Jian
26ae354dc5 Merge branch 'feature/support_esp32c3_lightsleep_master' into 'master'
support esp32c3 lightsleep for master

Closes IDF-2106

See merge request espressif/esp-idf!11975
2021-01-20 16:00:06 +08:00
Angus Gratton
55970fe3a2 Merge branch 'feature/esp32c3_support_brownout' into 'master'
esp32c3: Adds support BROWNOUT reset

Closes IDF-2397

See merge request espressif/esp-idf!11910
2021-01-20 12:19:56 +08:00