Sorry for the late reply. At the moment, the achieved SPI transfer speed using bit-banging is sufficient for reading data from two SPI slave devices every 2 ms (500 samples per second). My original goal was 1 kSPS, but this will probably not be achievable.
Below, I am sending the complete code for ...
Search found 52 matches
- Sun Feb 23, 2025 10:41 am
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
- Tue Feb 11, 2025 7:46 pm
- Forum: Hardware
- Topic: Start a SPI DMA transmission by GPIO trigger ? - ESP32-S3 Forum
- Replies: 14
- Views: 10113
Re: Start a SPI DMA transmission by GPIO trigger ? - ESP32-S3 Forum
Hello,
Thank you for the advice. I am sharing my experience with ULP RISC-V SPI Simulation Using Bit-banging below:
https://esp32.com/viewtopic.php?f=12&t=44179&start=10
This method has a limited data reading speed. For faster transfers, it is necessary to activate APB bus and CPU and transfer data ...
Thank you for the advice. I am sharing my experience with ULP RISC-V SPI Simulation Using Bit-banging below:
https://esp32.com/viewtopic.php?f=12&t=44179&start=10
This method has a limited data reading speed. For faster transfers, it is necessary to activate APB bus and CPU and transfer data ...
- Tue Feb 11, 2025 7:39 pm
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
Thank you for the tips! I tested all possibilities and combinations of data reading by uint8_t, uint16_t, and uint32_t types. Unfortunately, I couldn't achieve faster reading. Using a 32-bit array can speed up the process by approximately 10%, but at the cost of irregular bit lengths. I decided to ...
- Tue Feb 11, 2025 6:42 pm
- Forum: ESP-IDF
- Topic: Light sleep after sending a UDP packet using the sendto() function on ESP32-S3
- Replies: 2
- Views: 1126
Re: Light sleep after sending a UDP packet using the sendto() function on ESP32-S3
What is the best approach for the fastest transition to light sleep after sending a UDP packet? Is it better to use automatic light sleep without manually triggering the light sleep function? Would it be more efficient to send, for example, 10 UDP packets and then sleep for a longer period? What ...
- Sun Feb 09, 2025 2:37 pm
- Forum: ESP-IDF
- Topic: Light sleep after sending a UDP packet using the sendto() function on ESP32-S3
- Replies: 2
- Views: 1126
Light sleep after sending a UDP packet using the sendto() function on ESP32-S3
Dear ESP programmers,
I am working on a power-saving project where I need to periodically send UDP packets (1500 bytes each) every 10 ms to 50 ms. How can I ensure that ESP immediately enters light sleep after sending each packet?
So far, it only works reliably when I insert a 50 ms delay between ...
I am working on a power-saving project where I need to periodically send UDP packets (1500 bytes each) every 10 ms to 50 ms. How can I ensure that ESP immediately enters light sleep after sending each packet?
So far, it only works reliably when I insert a 50 ms delay between ...
- Sun Feb 02, 2025 2:07 pm
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
This code gives almost the same time for reading 28 bytes of data (even a few microseconds more than the previous code). I have no more ideas :-( I need to read 28 bytes of data under 500 µs, which is very close—right now, it takes about 530 µs.
uint32_t read_buffer1[28] = {0};
for(uint8_t i ...
uint32_t read_buffer1[28] = {0};
for(uint8_t i ...
- Sun Feb 02, 2025 10:34 am
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
I encountered another major problem. Assigning a single byte to an array element takes about 7 µs! Is there a more optimal way to store a 27-byte block faster?
uint8_t read_buffer[27] = {0};
for(int i = 0; i < 27; i++) {
REG_WRITE(RTC_GPIO_OUT_W1TS_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TS ...
uint8_t read_buffer[27] = {0};
for(int i = 0; i < 27; i++) {
REG_WRITE(RTC_GPIO_OUT_W1TS_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TS ...
- Sat Feb 01, 2025 11:02 pm
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
This is the only way how to get the read_buffer elements ? It seems to be correct, it returns the right values. I tried other options to access the read_buffer, but it always returned an error except for this approach...
for(int i = 0; i < 27; i++) {
printf("%lu ", *(uint32_t *) (&ulp_read_buffer ...
for(int i = 0; i < 27; i++) {
printf("%lu ", *(uint32_t *) (&ulp_read_buffer ...
- Sat Feb 01, 2025 9:36 pm
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
How can an array or a block of data be shared between the ULP and the main program? I am unable to share an array for the SPI buffer. All variables are automatically created as uint32_t. I cannot read the array in the main program either via a pointer or by directly accessing its elements. Thank you ...
- Sat Feb 01, 2025 5:56 pm
- Forum: Hardware
- Topic: ULP RISCV SPI Simulation Using Bit-banging
- Replies: 22
- Views: 13889
Re: ULP RISCV SPI Simulation Using Bit-banging
Ladies and gentlemen, this way you can generate 1.1 MHz!
REG_WRITE(RTC_GPIO_OUT_W1TS_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TS_S));
REG_WRITE(RTC_GPIO_OUT_W1TC_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TC_S));
350 kHz:
REG_SET_FIELD(RTC_GPIO_OUT_W1TS_REG, RTC_GPIO_OUT_DATA_W1TS, 0x02);
REG ...
REG_WRITE(RTC_GPIO_OUT_W1TS_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TS_S));
REG_WRITE(RTC_GPIO_OUT_W1TC_REG, (BIT(CLK_PIN) << RTC_GPIO_OUT_DATA_W1TC_S));
350 kHz:
REG_SET_FIELD(RTC_GPIO_OUT_W1TS_REG, RTC_GPIO_OUT_DATA_W1TS, 0x02);
REG ...