Search found 5 matches

by Teynaker
Wed May 17, 2023 4:07 pm
Forum: ESP-IDF
Topic: Read Sensor at 1344Hz
Replies: 9
Views: 2857

Re: Read Sensor at 1344Hz

Think about that for a moment. At 400kHz clock, can the I2C bus transfer dozens of bits of data in "less than 1 micro second"? Thats true, I made a mistake. Now I corrected it and get 1095us read time, its the problem but I just execute simple reads I guess I2C at 400kHz not support 1344Hz data rat...
by Teynaker
Mon May 15, 2023 9:23 pm
Forum: ESP-IDF
Topic: Read Sensor at 1344Hz
Replies: 9
Views: 2857

Re: Read Sensor at 1344Hz

Since you're using a binary semaphore, the signalling of the ISR may also get lost when the ISR gives the semaphore more than once before the task has a chance to take it. I think this happens or the problem is related to this, but I don't know why it happens. No, it's not. The tick rate is the low...
by Teynaker
Mon May 15, 2023 1:58 pm
Forum: ESP-IDF
Topic: Read Sensor at 1344Hz
Replies: 9
Views: 2857

Re: Read Sensor at 1344Hz

Code looks ok, though I cannot find the code of the library you use to control the sensor. One thing however is that you don't check the result of xSemaphoreTake(readSemaphore, 100 / portTICK_PERIOD_MS); So you don't know if the interrupt actually got triggered or if the SemaphoreTake timed out wit...
by Teynaker
Fri May 12, 2023 1:45 pm
Forum: ESP-IDF
Topic: Read Sensor at 1344Hz
Replies: 9
Views: 2857

Re: Read Sensor at 1344Hz

Can you show some code? Specifically the ISR and the task that's reacting to it? Do you use the I2C or the SPI interface? I use I2C at 400kHz, here the code: #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <inttypes.h> #include "hal/gpio_types.h" #include "sdkconfig.h" #include...
by Teynaker
Thu May 11, 2023 9:16 pm
Forum: ESP-IDF
Topic: Read Sensor at 1344Hz
Replies: 9
Views: 2857

Read Sensor at 1344Hz

Dear community, I want to acquire data from accelerometer LIS3DH at 1344Hz sample rate. - Approach using ISR rising edge for data ready pin, that means LIS3DH generate interrupt at approximately 1344Hz. In the ISR will enable semaphore which is evaluate in ReadSensorTask, the problem with this appro...