Search found 26 matches
- Mon Jul 13, 2020 7:27 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
Thanks so much, right now I have it working with the semaphore as you suggested. Right now I am keeping the interrupt enabled during the read window for scan, and then creating task to check for bool irqready that is also toggled by irq trigger. I have a delay function at end of the task loop to all...
- Sun Jul 12, 2020 11:14 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
any advice on what to use to allow me to call the read function immediately after/in response to the interrupt? Deferred handling? using rtos task notifcation as a lightweigh semaphore? task suspension followed by xTaskResumeFromISR? I'm unsure of my options. All I really need is to make sure the re...
- Sun Jul 12, 2020 8:14 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
I still can't really get this to implement with a interrupt only solution, any calling of adc read events from the interrupt causes crashes and right now my reads are on a loop and I'm protecting my read function with a semaphore and nothing else... interrupt overlaps incorrectly with other events a...
- Sun Jul 12, 2020 2:42 am
- Forum: ESP-IDF
- Topic: ULP wakeup by peripheral signal possible?
- Replies: 4
- Views: 6916
- Sun Jul 12, 2020 12:28 am
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
This felt weird but worked? void iram_attr scan_semaphore(){ fast_command(FAST_ADC_START); vTaskDelay(40 / portTICK_PERIOD_MS); for(int i=0;i<17;i++){ read_adc_wchid(); vTaskDelay(40 / portTICK_PERIOD_MS); }; } it's like centering a vcr on the right signal for the blanking, I have the pin pulled up ...
- Sat Jul 11, 2020 10:46 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
Haven't whipped this yet, it appears that every time it comes to the scan mode event (which is what is looping the interrupt to read and back again) it will read the FIRST returned value the first time it goes through, and then only the LAST value every other time but that, it doesn't matter if I lo...
- Sat Jul 11, 2020 6:40 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
It's odd, I'm missing reads here without having any sort of delay codes, out of 4 read events that should be triggered, i'm missing #1 and #3. It shouldn't take over 80ms to setup irq event to respond to negative edge right? I can post code again if helpful, but it seems odd that I would be able to ...
- Sat Jul 11, 2020 3:59 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
I am trying to implement a binary semaphore like in example spi_slave/sender. Will see how it goes
- Fri Jul 10, 2020 8:34 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
I found that I had been seeing gpio 14 not 13 on the gpio reply on the terminal so I fixed it and now code is (with added sections) #define GPIO_IRQ 13 #define ESP_INTR_FLAG_DEFAULT 0 #define GPIO_INPUT_PIN_SEL GPIO_IRQ void read_from_register(char register_id,unsigned int byte_count){ register_id <...
- Fri Jul 10, 2020 8:05 pm
- Forum: ESP-IDF
- Topic: Implementation of Interrupt Allocation
- Replies: 24
- Views: 22055
Re: Implementation of Interrupt Allocation
I can see I need to move tje printf function, but should I also include the code for the read_adc_wchid?