Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/odelot/esp32s3-fast-parallel-read
example reading 16bits in parallel using DMA on esp32s3
https://github.com/odelot/esp32s3-fast-parallel-read
16bits 16bits-parallel-read camera-module esp32s3 fast-reader parallel-read
Last synced: 7 days ago
JSON representation
example reading 16bits in parallel using DMA on esp32s3
- Host: GitHub
- URL: https://github.com/odelot/esp32s3-fast-parallel-read
- Owner: odelot
- License: cc-by-sa-4.0
- Created: 2024-07-11T14:18:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-07-14T15:05:27.000Z (3 months ago)
- Last Synced: 2024-09-22T16:02:27.377Z (11 days ago)
- Topics: 16bits, 16bits-parallel-read, camera-module, esp32s3, fast-reader, parallel-read
- Language: C
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
| Supported Targets | ESP32-S3 |
| ----------------- | -------- |# ESP32S3 Fast Parallel Read
This code provides a straightforward example of how to read 16 bits in parallel using DMA on the ESP32S3.
Please note that this example is simplified and some shortcuts were taken for the sake of testing and understanding the functionality.
Currently, the code does not use a queue to send the data read from the GDMA interrupt. During testing, no issues have been encountered when reading from GDMA memory.
## How to Use/Test the Code
The goal is to read data in parallel quickly and without CPU load using General Purpose DMA (GDMA).
This example demonstrates how to use the camera peripheral to read data in parallel and transfer it to memory using GDMA.
The speed is set to a low rate (157,480 Hz) to make the code easier to understand and debug. If you want to increase the read speed by adjusting the clock configuration and decreasing the div_n value, you will need to modify the number of DMA descriptors and increase the size of each descriptor. Additionally, you will need to remove any code used for debugging and testing.
The configuration of cam_bit_order and cam_byte_order, combined with the fact that the ESP32 is a little-endian chip, results in the data being read as unsigned words. In this configuration, the first input pin (GPIO_NUM_1) is read as the most significant bit of the word.
Example with this code configuration (cam_bit_order = 1 and cam_byte_order = 0):
```
16 bit word to read: 0x0F51 (or 3921 in decimal)
Binary to be read: 0 0 0 0 1 1 1 1 0 1 0 1 0 0 0 1
GPIO pins: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
```## Folder contents
The project contains one source file in C language [main.c](main/main.c). The file is located in folder [main](main).
ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt`
files that provide set of directives and instructions describing the project's source files and targets
(executable, library, or both).Below is short explanation of remaining files in the project folder.
```
├── CMakeLists.txt
├── main
│ ├── CMakeLists.txt
│ └── main.c
└── README.md This is the file you are currently reading
```## License
CC Attribution-ShareAlike 4.0 International