Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • Garug's Avatar
    06-04-2021, 06:39 AM
    On obvious serious errors like this, it should not warn but refuse to compile. The warnings I find not useful at all, super difficult to read with the long paths included.
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 06:33 AM
    Well maybe it would be time to have an option on compiler to validate them... one would not need to run that every time, but when problems if would be super useful and time saving tool. I spend hole yesterday...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 06:15 AM
    With LabView I can easily make what ever plotting, the problem just is I only have that on Windows and I am done with Windows unless I absolutely need to go there (and when I do it always takes hours for the updates to...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 05:36 AM
    "that is why it's called undefined behavior " yes I guess so :) but wonder, for the compiler it should be easy to see something gets written outside the limits. Why does it let to compile this?
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 05:27 AM
    " Best to have the sketch limit what is sent, or problems can be expected." The thing is, I need to see all samples to see they are correctly sampled and no jitter. I really hope the serial plotter and monitor...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 05:10 AM
    After some more investigation this morning with fresh eyes, found the problem, and it is on my code. The strange thing though is sometimes this fails, and with the same problem the millis() may work ok also. On this...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 04:18 AM
    This problem feels it is not my code or even libraries, but something under them. The code needs i2c IMU to run. Also as said the same code edited again from older version works fine. So it is very weird. I am using now...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-04-2021, 03:42 AM
    Thanks, I uninstalled Java and reinstalled, and now the hangs at least when accessing file seems to be gone. But any idea how micros() could break like that? I do not see how that could be Java related. it has felt...
    86 replies | 7182 view(s)
  • Garug's Avatar
    06-03-2021, 06:05 PM
    Is there a version for macOS Big Sur 11.4 ? I am currently using long time a go installed 1.53 and having some hangs on UI, like when accessing files. also now some weird issues with micros() a the code timing was...
    86 replies | 7182 view(s)
  • Garug's Avatar
    05-26-2021, 04:36 PM
    Yes, the usb_desc_copy.c was a bad idea, I really could not imagine compiler would use it just because it is on that directory and prefer it over usb_desc.c that I was editing. Anyway, now the backups are on completely...
    10 replies | 2096 view(s)
  • Garug's Avatar
    05-26-2021, 03:12 PM
    What is the current status on this, does Teensy 4.0 have true HW support to upload FW over HW serial?
    19 replies | 3023 view(s)
  • Garug's Avatar
    05-26-2021, 02:01 PM
    I do not understand. That is very strange, but seems to be the case. I removed the file form the directory, and still compiles just fine. But after restarting Arduino environment does not compile any more, so clearly...
    206 replies | 234656 view(s)
  • Garug's Avatar
    05-26-2021, 01:30 PM
    Here is a video the usb_desc.c has been renamed usb_desc_d.c there is no usb_desc.c The joystick name has been edited on the usb_desc.h that is on the same directory, so the directory should be correct. ...
    206 replies | 234656 view(s)
  • Garug's Avatar
    05-26-2021, 01:13 PM
    My main problem is that edits or deletion of usb_desc.c are not effective. I spend couple of hours reading forums and trying things before realising I can delete the file and it compiles just the same. I tried...
    10 replies | 2096 view(s)
  • Garug's Avatar
    05-26-2021, 01:08 PM
    "If building for Teensy 4.x you use the files in cores\teensy4" The problem is exactly that I can delete usb_desc.c from the teensy4 directory and it builds (and joystick works). The usb_desc.h on the same directory...
    206 replies | 234656 view(s)
  • Garug's Avatar
    05-26-2021, 12:08 PM
    Where is the correct usb_desc.c to be modified located?? Teensy 4.0 Teensyuino 1.53, I can delete it from Teensy4 and Teensy3 folders and makes no difference, nor the changes I do on them.
    206 replies | 234656 view(s)
  • Garug's Avatar
    05-26-2021, 11:51 AM
    I do not get it, I have changed all usb_desc.c to Uusb_desc.c and it just compiles and works as before, where are the USB Joystick definitions??
    10 replies | 2096 view(s)
  • Garug's Avatar
    05-26-2021, 09:34 AM
    Was there any solution to this? how do I reduce the number of buttons to 10? Some practical and working example how to change something simple like this would be very useful. what I edit in usb_desc.c does not...
    10 replies | 2096 view(s)
  • Garug's Avatar
    05-25-2021, 05:26 PM
    There was stubit mistake I had, forgot the adc->adc0->startTimer(18000); //frequency in Hz is for both separatelly and one of them was at 3000 so it was limiting also the other one. This is working good, it...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-25-2021, 08:33 AM
    Now, but in practise how would that be different by doing it with interrupt timer? Could the teensythreading use the CPU time for something else while the analogueRead() waits the conversion to be ready and how well...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-25-2021, 07:21 AM
    Currently I get around 10k speeds when the MCU is not busy doing anything else. the problem is, when there is movement on the screen, there is a lot of pixels to calculate and the analogue read speeds get more to the...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-25-2021, 06:56 AM
    The startSynchronizedSingleRead() sounds interesting but should get that working with DMA. Maybe that is what is happening with the above /* uses startSingleRead() example, should just find how to set it so that after...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-25-2021, 04:41 AM
    I am not sure if I did read long enough but looks like that uses analogueRead() that waits for the reading to be ready. The reason I want to use DMA is to free processor resources and keep reading even when busy...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 06:36 PM
    It is totally ok to read Joystick X and Y for 6 ms and then Potentiometer 1 and 2 for 6 seconds and continue like that. But I would like to have as many good samples during the 6 ms as possible so that that can be then...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 05:57 PM
    This works now pretty nicely, but update rates are much lower than above. Value up to 10 000 Hz can be put to startTimer(4000); //frequency in Hz but it provides no better update-rates than 4000 Hz. the ...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 01:52 PM
    I got this working surprisingly well with quick and thirty method, modifying it from the exambles. There is currently at least the problem that pabdma->userData(average_value); does not get correct average_value....
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 11:52 AM
    Ok, so the problem was the old libraries on Teensyuino 1.53. I deleted the /ADC contents and copied the Ginthub contents there and now get it compiling and this seems to work #include <ADC.h> #include...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 10:56 AM
    The DMA examples compile but never enter setup, or at least do not print Serial.print("START"); that is right after the while (!Serial && millis() < 5000) ; when cleaning them up of all the #if defined that makes it...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 10:15 AM
    But what exactly am I looking here file:///Users/.../Desktop/Teensyduino%201.53.app/Contents/Java/hardware/teensy/avr/libraries/ADC/index.html or here https://github.com/pedvide/ADC/tree/master/examples The...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-24-2021, 08:18 AM
    What is the status of Teensy 4.0 ADC support, using Teensyuino1.53 (or other version if better) I find the information very scattered, what is supported and not for Teensy 4.0 and how to use it correctly There is...
    21 replies | 800 view(s)
  • Garug's Avatar
    05-23-2021, 05:19 PM
    I was paying with DMA for ADC, did not get it working (adc_timer_dma.ino), but as result one of the potentiometers have now clear dead area, couple of degrees. Maybe possibele that the Potentiometer is somehow broken,...
    30 replies | 8313 view(s)
  • Garug's Avatar
    05-23-2021, 04:43 PM
    Garug replied to a thread Teensy 4.0 DMA ADC in Project Guidance
    What should I do to get the adc_timer_dma working with Teensy 4.0? It is very confusing the same example is for On Teensy 3.x this uses the PDB timer. On Teensy 4, this uses one or two of the unused...
    2 replies | 533 view(s)
  • Garug's Avatar
    05-22-2021, 01:15 PM
    Thanks, very useful info. Now that they are defined static const, accessing them directly via function works perfectly.
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-22-2021, 10:38 AM
    I did make it so that the 32 bits are read on one access to function, so reducing the function reads 32x. got the arrow to draw nicely, but still was problems with fonts that can be positioned at 1 pixel steps. ended up...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-22-2021, 08:31 AM
    Probably not DMA related but... I got finally ADC reading fast and well filtered and screen updates solid 140+ FPS for moving and rotating arrow like below and it is super smooth. uint32_t ArrowBig = {...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-21-2021, 01:30 PM
    Jeah the pointers and stuff, I really try to stay a way form them, but it gets more and more difficult. For me it seems as a concept to use if asking for memory leaks etc stuff and like to trouble shoot them. That of...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-21-2021, 12:26 PM
    The problem I have is something like this "The nullptr keyword can be used anywhere a handle, native pointer, or function argument can be used." Just does not compute for me. So in tis context we are now...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-21-2021, 11:04 AM
    How is this event handler stuff working it seems this works as well, so what was the 'EventResponderRef eventResponder' for? //void callback( EventResponderRef eventResponder ){ void callback( ){ ...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-20-2021, 03:21 PM
    Note: SPI.transfer((void *)txBuffer, nullptr, pixCount, callbackHandler); probably should have pixCount +1.
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-20-2021, 08:39 AM
    A story of my first SPI DMA trials, a stupid error that cost me 15 hours, and at the end working example code using SPI DMA https://forum.pjrc.com/threads/67247-Teensy-4-0-DMA-SPI
    29 replies | 11028 view(s)
  • Garug's Avatar
    05-20-2021, 08:33 AM
    Here is a tested and working code for the screen update using SPI DMA using Teensy 4.0 and for Sharp 400x240 memory display, connection in here...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-20-2021, 06:34 AM
    I tried this uint8_t txBuffer2; uint8_t txBuffer __attribute__((aligned(32))); uint8_t DMAMEM screenData;//50 holds 8 x 50 = 400 B/W pixels uint8_t screenDataOld; i.e trying to adjust with...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-20-2021, 05:33 AM
    I think that did the recompilation trick as now get "Compiling library "SPI"" but it did not help. I still need to do this to get it working correctly uint8_t txBuffer __attribute__((aligned(32))); uint8_t ...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-20-2021, 12:25 AM
    "It says that no source files changed that would require spi to recompile. " Yes, but the question is, does it do that analysis correctly. Is there a simple way for force recompile all.
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 07:53 PM
    I noted Using previously compiled file: /var/folders/j0/czwf_k9507340824y6129t3h0000gp/T/arduino_build_438271/libraries/SPI/SPI.cpp.o Would that be holding also the DMA related memory allocations and when new...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 07:18 PM
    Thanks, I did not notice the pixCount = 1 was inside the if condition when created the return. Just tested, it seems that fixed the random noice I was getting after this update, and also it tolerates now...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 06:03 PM
    Here is the complete involved subroutines sending the picture. The drawScreen() : picture is stored in screenData first it is compared to screenDataOld to see if there was any changes and the changed lines are stored...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 04:44 PM
    This is the current sending routine. first the txBuffer is build and immediatelly after sent. So are you saying there should be a delay before sending so that the txBuffer is completelly written to memory before...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 03:45 PM
    I did get it working undefining memory alocations for other globals than these uint8_t DMAMEM screenData;//50 holds 8 x 50 = 400 B/W pixels uint8_t DMAMEM screenDataOld; uint8_t DMAMEM txBuffer...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 03:01 PM
    But how do I make the SPI DMA memory stuff then act nicely? Now it is completely unmanageable and un predictable. Works by luck randomly experimenting allocating global variables using FASTRUN, DMAMEM, and FLASHMEM. ...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 02:54 PM
    Just to confirm, when the frame buffer is defined as uint8_t FASTRUN txBuffer __attribute__((aligned(32))); there is no reason to use arm_dcache_flush(); or arm_dcache_delete(); and if I would use them it...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 02:32 PM
    Thanks Kurt, as I edited above got it kind of working using the memory allocations, but really do not understand that SPI DMA seems to act both on DMAMEM and FASTRUN, and really feel the SPI DMA implementation is...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 01:00 PM
    It is wery basic questions I have at this time - what defines the SPI DMA cache, how do I access it - is there a way to allocate that to safe place, I have plenty of memory available and the transfer requires only...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 11:14 AM
    So many post to read, but so difficult to find the needed information. here is good discussion about the memory https://forum.pjrc.com/threads/57326-T4-0-Memory-trying-to-make-sense-of-the-different-regions/page1 ...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 08:47 AM
    I see there has been a lot of discussion of this, but still have problems understanding how and where to allocate the uint8_t SPIdata ; //12482 needed, but somewhere said should be maybe multiply of 32 Needed...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 06:39 AM
    Do I need to allocate the memory segment for DMA somehow?
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-19-2021, 04:22 AM
    I am having now very weird problem. If I define a new array, it seems any array, in this case uint8_t SW; the first time I use like doing SW = 1; on the loop, the screen goes blank, though this array has nothing to do...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-18-2021, 03:04 PM
    Thanks for the detailed and insight full reply. It is two folded do I really want to get so deep on details, the truth is I do, but I should not as it takes time of the tasks I need to complete. There is few details...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-18-2021, 11:09 AM
    What I do not understand is the SPI.transfer((void *)SPIdata, nullptr, pixCount, callbackHandler); this seems to work as well SPI.transfer(SPIdata, 0, pixCount, callbackHandler); But where is this...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-18-2021, 10:19 AM
    happy to report that with help of this https://forum.pjrc.com/threads/58234-Teensy-4-0-problem-with-DMA-to-from-OCRAM-interacting-with-Audio-library I got the SPI DMA working. The funny thing is that the actual...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-18-2021, 08:32 AM
    "Check out this file on your system :: "...YOUR arduino..."\hardware\teensy\avr\libraries\ADC\index.html Open in browser and there is documentation that should hold answers." so exactly where? I am using Mac and...
    30 replies | 3291 view(s)
  • Garug's Avatar
    05-18-2021, 07:31 AM
    Actually the line number problem was problem on my code. I got it now updating whole screen with a single SPI transfer. So the challenge would be to transfer this using DMA SPI.transfer(SPIdata, pixCount); The...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-18-2021, 04:57 AM
    Thanks KurtE, I found this, but not sure if looking the right place //========================================== // T4 //========================================== #if defined(ENABLE_EXT_DMA_UPDATES) //...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-17-2021, 09:10 PM
    I have connected Sharp Memory Display 400 x240 to Teensy 4.0 and it works great. Very fast and responsive expesially when run at 10 Mhz SPI, it seems to run even with 14 Mhz but the specified is only 2 MHz. Anyway,...
    42 replies | 1150 view(s)
  • Garug's Avatar
    05-05-2021, 03:23 PM
    With the above codes there is still problem with LSB and MSB, it just seems the display mixes both, causing totally unnecessary problems. It apears the line numbers are on different order than rest.
    29 replies | 11028 view(s)
  • Garug's Avatar
    05-05-2021, 11:21 AM
    This is highly optimised and running at 10MHz SPI clock, drawing just the lines that have updates, drawing a 4x14 pixel block that moves just 1 pixel at every update, the video is slowed down with iPhone7, not sure of...
    29 replies | 11028 view(s)
  • Garug's Avatar
    05-05-2021, 07:53 AM
    The electrical connection
    29 replies | 11028 view(s)
  • Garug's Avatar
    05-05-2021, 07:17 AM
    Here is still code that updates the whole screen with random data (noise). According to the display specifications 2 MHz is max SPI clock, but tested it up to 16 MHz, there is clearly starts to have problems, 10 MHz...
    29 replies | 11028 view(s)
  • Garug's Avatar
    05-05-2021, 06:02 AM
    This works with teensy 4.0 and 400x240 display. The bit order of commands is reversed just to make it more understandable. The for (int i = 0; i <50; i++) {SPI.transfer(0b10010010); } draws the pixels. (50 x 8 =...
    29 replies | 11028 view(s)
  • Garug's Avatar
    04-20-2021, 01:48 PM
    It was just error on my code, Teensy 4.0 seems to support just fine the Inverted Serial.
    2 replies | 231 view(s)
  • Garug's Avatar
    04-20-2021, 08:57 AM
    Hi, I am trying to read SBUS with Teensy 4.0, the code has been working fine on teensy 3.2. There could be something else wrong also, but should Teensy 4.0 support Serial3.begin(100000, SERIAL_8E1_RXINV_TXINV); ? ...
    2 replies | 231 view(s)
No More Results
About Garug

Basic Information

Statistics


Total Posts
Total Posts
159
Posts Per Day
0.07
Last Post
Teensyduino 1.54 Beta #9 06-04-2021 06:39 AM
General Information
Last Activity
06-09-2021 07:18 PM
Join Date
03-17-2015