Commit Graph
75 Commits
Author SHA1 Message Date
Armando 6bb6f3ebc4 adc: refactor esp32s3 adc_ll.h 2021-07-15 10:33:03 +08:00
Armando 1962574cd8 spi_flash: make spi_flash_private.h ci check fail known issue 2021-06-25 19:41:57 +08:00
Armando bc248278f8 spiflash: add octal spi psram support on 727 2021-06-25 19:41:57 +08:00
Armando 6a49ceb67e spi_master: enable a test closed for s3 before 2021-06-21 19:42:49 +08:00
Armando b2409b1d34 essl: remove chip related comments in essl.h 2021-05-06 14:03:05 +08:00
Armando 831b6127d7 spi: update interrupt set in spi_ll.h 2021-04-27 11:11:00 +08:00
Armando b53a68bf70 spi: update spi_struct and spi_reg to 727 2021-04-27 11:11:00 +08:00
Armando 6930d6aa1e spi_slave_hd: add segment mode example 2021-04-22 19:24:59 +08:00
Armando 3177130256 adc: add adc programming guide on c3 2021-04-21 10:40:55 +08:00
Armando 44fafd4991 spi_slave_hd: add polling api to read/write buf to essl_spi 2021-04-20 20:08:30 +08:00
Armando 85e29dace7 spi_slave_hd: add callback after data is loaded to the DMA for segment mode 2021-04-20 20:08:29 +08:00
Armando 370fedf967 spi_master: enable spi speed test on c3 and update the programming guide
accordingly
2021-04-15 21:20:19 +08:00
Armando 9aa9939406 spi: update esp32c3 programming guide 2021-04-15 21:20:19 +08:00
Armando 9b9ea71ff9 spi: remove HSPI macro on esp32c3 and esp32s3 2021-04-06 13:42:49 +08:00
Armando cc6bfcd9ac adc: apply adc power API to adc driver
Closes https://github.com/espressif/esp-idf/issues/6269
Closes https://github.com/espressif/esp-idf/issues/6682
2021-03-26 17:58:00 +08:00
Armando 37e3b79b89 adc: rename adc examples according to hw feature and usage 2021-03-26 12:04:46 +08:00
Armando 0e0baee25a 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 12:04:46 +08:00
Armando 2bb9bd5fb2 adc: update adc programming guide to avoid build fail 2021-03-26 12:04:46 +08:00
Armando 6f4d992ac7 adc: update lock scope on esp32c3 2021-03-26 12:04:46 +08:00
Armando 0030179642 adc: rename adc related examples 2021-03-26 12:04:46 +08:00
Armando e9995fe165 adc: add pm_lock to adc driver on esp32c3 2021-03-26 12:04:46 +08:00
Armando a5295af829 adc: update adc header files on c3 2021-03-26 12:04:46 +08:00
Armando 00a3f48bd8 adc: refactor adc single read api on esp32c3 2021-03-26 12:04:46 +08:00
Armando 69a0f8b9bb adc: seperate hal layer and driver layer 2021-03-26 12:04:46 +08:00
Armando bee90f57f1 adc: remove unused functions on esp32c3 2021-03-26 12:04:45 +08:00
Armando 026545b71e spi_slave_hd: add a dual-board test when master sends too long on
ESP32C3

This test can also be used between ESP32/S2/S3/C3.
2021-03-25 10:31:29 +08:00
Armando c05fde2cbf efuse: revert ESP_LOG to ESP_EARLY_LOG in src/esp_efuse_utility.c
Closes https://github.com/espressif/esp-idf/issues/6660
2021-03-24 11:28:45 +00:00
Armando 01b5ef31b4 spi_slave: enable spi slave dual board test on esp32c3 2021-03-16 16:08:49 +08:00
Armando dd8076acf4 spi: update slv dual board test for ci due to no pullup resistor on io10 on c3 2021-03-16 15:28:17 +08:00
Armando 0fb93c3726 spi_master: fix cmd test ci failure 2021-03-15 11:31:38 +08:00
Armando 346dea206e spi_slv_hd: add hal_trans_finish comments for clarifying risk 2021-02-24 12:01:31 +08:00
Armando 8d90d3072c spi_slave_hd: refactor the hal append api to remove the spinlock 2021-02-24 12:01:31 +08:00
Armando 889de9ebd9 spi: add enum for spi dma channels 2021-02-22 07:06:05 +00:00
Armando d0415bd8f6 spi: remove hard-coded DMA chan in soc_caps.h 2021-02-22 07:06:05 +00:00
Armando db3bf8b544 spi: refactor spi_common dma allocator 2021-02-22 07:06:05 +00:00
Armando c8d9ed1f3d spi: update unit tests to spi gdma allocator 2021-02-22 07:06:05 +00:00
Armando c438ad5d72 spi: apply gdma allocator to SPI 2021-02-22 07:06:05 +00:00
Armando 2e670bf6af spi: add dma channel auto-alloc feature on esp32 2021-02-22 07:06:05 +00:00
Armando 5427c18781 adc: apply gdma api to adc on esp32c3 2021-02-08 11:41:21 +08:00
Armando 3fde25374a adc: add comment for ADC sampling frequency 2021-01-25 15:08:40 +08:00
Armando 83ed258f6f 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 15:07:32 +08:00
Armando 402ccacc10 system: update edma reset in system_api_esp32c3/s3.c 2021-01-25 04:51:40 +00:00
Armando f5f0461264 tmpsensor: add temp_sensor.h for c3 2021-01-25 04:51:40 +00:00
Armando f9ec7ddda3 adc: add comment for ADC sampling frequency 2021-01-25 04:51:40 +00: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
Armando 5798c22a5c adc: replace assert with esp check 2021-01-25 04:51:40 +00:00
Armando 271c97149d rtc_tmpsensor: remove redundant semaphore on c3 2021-01-25 04:51:40 +00:00
Armando 02600309c8 adc: fix some regression issues 2021-01-25 04:51:40 +00:00
Armando 2b737c1927 adc: fix adc invalid data issue by update adc_reset 2021-01-25 04:51:40 +00:00
Armando 4793bb3267 adc: update adc_dma example README.md 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
Armando 0538dc2d93 spi_slave_hd: add DMA Append Mode feature 2021-01-21 18:53:53 +08:00
Armando 2bc1442351 spi_slave: add a dual board test of sending/receiving unalinged data on
esp32c3

This test can also be used between ESP32/S2/S3/C3.
2021-01-05 21:26:53 +08:00
Armando 23d08fbe85 spi_master: add a test for HD master to receive data correctly via dma
Issue Description:
If master is in HD mode, if it sends data without receiving data,
it will still enable the RX DMA because of old version ESP32 silicon issue.
And because there is no correctly linked RX DMA descriptor,
an inlink_dscr_error intr will be seen, which will influence the following RX transactions.

This issue is only found on ESP32.
2021-01-05 19:32:46 +08:00
Armando 0c3653b1fd spi_master: fix master HD mode cannot correctly receive data issue when using DMA.
Issue Description:
If master is in HD mode, if it sends data without receiving data, it will
still enable the RX DMA because of old version ESP32 silicon issue. And
because there is no correctly linked RX DMA descriptor, an
``inlink_dscr_error`` intr will be seen, which will influence the
following RX transactions.

Solution:
Trigge this workaround only in FD mode.

TODO:
Add a test to check if this workaround related issue does exit. If so,
reporting to Digital Team is also needed.
2021-01-05 18:16:49 +08:00
Armando 2d37bfa126 driver: Add adc_digi single conversion mode
- add lock for single read and continuous read APIs
- update onetime read start singal delay for hardware limitation[*]
- move adc_caps to soc_caps.h
- update license dates

[*] There is a hardware limitation. If the APB clock frequency is high, the
step of this reg signal: ``onetime_start`` may not be captured by the
ADC digital controller (when its clock frequency is too slow). A rough
estimate for this step should be at least 3 ADC digital controller
clock cycle.
2020-12-23 09:53:24 +11:00
Armando f80bcb733a uart: modify s3 ll functions of reading/writing fifo 2020-11-30 15:23:15 +11:00
Armando d393699ab6 uart: bringup on esp32c3 2020-11-30 15:23:15 +11:00
Armando 05a4a8d864 uart: seperate sclk and baudrate setting 2020-11-24 19:12:52 +08:00
Armando fb8b905539 uart: add uart support on esp32s3 2020-11-24 19:12:51 +08:00
Armando 9c507982aa spi: fix spi_ll.h func name
On esp32 and esp32s2:
``spi_ll_dma_set_out_eof_generation`` is modified to
``spi_ll_dma_set_rx_eof_generation``.

``spi_dma_ll_set_rx_eof_generation`` is modified to
``spi_dma_ll_set_out_eof_generation``.

Because on ESP32S3, this bit ``out_eof_mode`` is moved to DMA related
registers.
2020-11-19 19:33:02 +08:00
Armando f7e91ef6c1 spi: esp32s3 bringup for spi 2020-10-26 11:28:34 +08:00
Armando 5a3cca8f67 spi_slave: remove debug code
Closes https://github.com/espressif/esp-idf/pull/6023
2020-10-26 10:59:33 +08:00
Armando 1393520e78 spi_slave: fix crash issue caused by setting cs to -1
Setting cs num to -1 means cs pin is not connected. But passing the value -1 to the
spicommon_cs_initialize() will lead to program crash caused by "array index out
of bounds". We expect the driver to execute well but the driver should not be in
charge of users' behaviour, so this commit prevents the crash.

https://github.com/espressif/esp-idf/issues/5784
2020-09-30 11:40:52 +08:00
Armando 1e1beb69aa spi: fix build fail issue when target is esp32s3 2020-09-24 10:51:23 +08:00
Armando 59e350b195 spi: seperate the pointer for the TX and RX DMA 2020-09-21 20:33:56 +08:00
Armando 27a6f2666a spi_master: refactor hal context structures
This commit seperates the hal context into different configuration
structures based on their members' definitions. Through refactoring
spi_master.c, the device related configuration should be passed in and
set each time before a new transaction. The transaction related
configuration now is a local variable in case of the fact that error
occurs without any notice when user forgets to pass new transaction
configuration in (which means the old driver will use the trans_config
that is saved from last transaction).

Besides, via above refactor, this commit fixs a bug which leads to
wrong cs polarity setting.
Closes https://github.com/espressif/esp-idf/pull/5490

Moreover, via above refactor, this commit also fixs a bug about duplex
mode switching when multiple devices are added to the bus.
Closes https://github.com/espressif/esp-idf/issues/4641
2020-09-21 20:32:41 +08:00
Armando d3d4dd9357 spi_slave_hd: fix issue with adding callback calling judgement 2020-09-02 03:20:42 +00:00
Armando 725a8e6de0 docs: remove no longer existent limitation of spi slave 2020-08-26 09:00:34 +00:00
Armando fc6010c959 spi_master: add dummy check when both mosi and miso are set
Closes https://github.com/espressif/esp-idf/issues/2715
2020-08-18 10:30:30 +08:00
Armando 9d1c5df7ab spi_master: add docs for dummy check when both mosi and miso are set 2020-08-18 10:30:30 +08:00
Armando da9649df53 spi: fix issue with closing DMA before CPU reset 2020-08-17 21:32:20 +08:00
Armando aa93347972 spi: remove spi4 related macros and codes 2020-08-17 21:32:15 +08:00
Armando e58ce2141d spi_master: rename the hal layer function that calculates clock and timing 2020-08-17 17:04:07 +08:00