Search found 36 matches
- Wed May 01, 2019 4:32 pm
- Forum: Sample Code
- Topic: Dimming Neopixels, Delays<Microseconds
- Replies: 3
- Views: 6983
Dimming Neopixels, Delays<Microseconds
Neopixels have great possibilties. With a normal LEDs you can show the state of a system (blue= too cold, red= too hot). With a neopixel you can show values in between with smoothly changing colors from for instance blue ... many colors ... red. Dimming an LED may be done with PWM - not so with a Ne...
- Sun Apr 28, 2019 10:10 pm
- Forum: Sample Code
- Topic: Sinus Signal Generator from 18Hz to 250kHz
- Replies: 9
- Views: 66786
Sinus Signal Generator from 18Hz to 250kHz
From this excellent work as base https://github.com/krzychb/dac-cosine I build a signal generator to produce sinus signals from 18Hz to 250kHz. From 50Hz to 100kHz the difference to the wished frequency is about 1% And it works without CPU after initialisation. // Function generator Sin // (C) Helmu...
- Sun Apr 28, 2019 9:35 pm
- Forum: General Discussion
- Topic: DMA and DAC
- Replies: 10
- Views: 16648
Re: DMA and DAC
As far as I can see there is only one CW-Generator :x But it would be interesting to get a 2. Channel with DMA output. From this as base https://github.com/krzychb/dac-cosine I build a Sin Function-Generator which delivers frequencies from 18Hz to 250KHz. The frequencies from 50Hz to 100KHz (every v...
- Fri Apr 26, 2019 2:42 am
- Forum: ESP-IDF
- Topic: Reduce external interrupt latency
- Replies: 15
- Views: 26702
Re: Reduce external interrupt latency
Update2019/12: This listing is for esp-idf Version 3.1 For version 4.1 see below ! I am awaiting a shit storm ;) There are some people trying to start a program without RTOS using core 1. It is not easy. You may think using make menuconfig to set RTOS to core0 and write a function start_cpu1 should...
- Mon Apr 22, 2019 7:04 pm
- Forum: ESP-IDF
- Topic: Reduce external interrupt latency
- Replies: 15
- Views: 26702
Re: Reduce external interrupt latency
If you use a one-way-signal as a global variable the communication is much faster. One-Way means Task 1 only writes, Tasks 2 only reads. (volatile). Using this mechanism it is possible to get cycles of 300ns. But there is a drawback: The task in core 0 MUST run without a taskswitch, delay etc. That ...
- Mon Apr 22, 2019 5:37 pm
- Forum: ESP-IDF
- Topic: Reduce external interrupt latency
- Replies: 15
- Views: 26702
Re: Reduce external interrupt latency
Someone may ask "What the hell should this has it to do with interrupts?" Here is a code, where we use (core 1) xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken ); and (core 0) if( xSemaphoreTake( xSemaphore, LONG_TIME ) == pdTRUE ) { // ... do something } The core 0 task does not know t...
- Mon Apr 22, 2019 7:56 am
- Forum: ESP-IDF
- Topic: Reduce external interrupt latency
- Replies: 15
- Views: 26702
Re: Reduce external interrupt latency to 160 nanos
/* * FastIRQ * * Copyright (c) 2019, Dipl. Phys. Helmut Weber. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyr...
- Mon Apr 22, 2019 3:16 am
- Forum: ESP-IDF
- Topic: Reduce external interrupt latency
- Replies: 15
- Views: 26702
Re: Reduce external interrupt latency
It is a waste of processor time but is fast: 1) Start a task "Test" on core 1. In Test disable interrupts. All other tasks run on core 0 - where interrupts are allowed. 2) In program "Test" do an endless loop (which is never interrupted by a tick), which reads one (or more) pins. Use the gpio- regis...
- Wed Apr 10, 2019 2:04 am
- Forum: General Discussion
- Topic: Variable doesn't update between cores
- Replies: 30
- Views: 39491
Re: Variable doesn't update between cores
Sorry, a part was missing [Codebox] #include "freertos/FreeRTOS.h" #include "freertos/task.h" TaskHandle_t Task0; TaskHandle_t Task1; //byte variable1=0; //byte variable2=0; // this works int variable1=0; int variable2=0; // this works, its saver //volatile int variable1=0; //volatile int variable2=...
- Wed Apr 10, 2019 2:01 am
- Forum: General Discussion
- Topic: Variable doesn't update between cores
- Replies: 30
- Views: 39491
Re: Variable doesn't update between cores
[Codebox] #include "freertos/FreeRTOS.h" #include "freertos/task.h" TaskHandle_t Task0; TaskHandle_t Task1; //byte variable1=0; //byte variable2=0; // this works int variable1=0; int variable2=0; // this works, its saver //volatile int variable1=0; //volatile int variable2=0; void Task0code( void * ...