Search results

  1. J

    SPI data via DMA corrupt

    About 12 cm. To be honest I don't know since I can't really trace the copper that well. But if I take just a ruler I get that distance.
  2. J

    SPI data via DMA corrupt

    Currently there isn't anything connected to the board. My scope is the only thing connected to CN17, nothing else.
  3. J

    SPI data via DMA corrupt

    Ok, So I just trashed the zener diodes and fuses (those are now shorts) that where attached to the connector and tested it again. Somehow it now works without issues. @sicco, Assuming you are on the correct path. Somehow the capacitance of the zener diodes (3V3) causes the SPI to go crazy?!
  4. J

    SPI data via DMA corrupt

    In post 15 I did share the connector part (that is currently all there is connected to the pins). Today I am going to remove all the protection circuits as well and see if that brings any improvement. Since I didn't make the PCB design myself I'm also trying to get some more information on the...
  5. J

    SPI data via DMA corrupt

    Thanks for the test. The current signal is just a test to see if the SPI buffer is being transmitted ok. Your scope confirms my findings on the breadboard so that part is good. Something must be really really wrong with my PCB. I'll try a 3rd PCB and see if that improves things. Edit, Well now...
  6. J

    SPI data via DMA corrupt

    🤦‍♂️Facepalm moment. I updated that part to the following. However it doesn't change the output pattern. case 2: if(_spiDone) { state++; _spiDone = false; } To make sure the correct code was loaded I also did a factory...
  7. J

    SPI data via DMA corrupt

    Well, it keeps on getting stranger and stranger. Today I decided to grab a different scope (Rigol DS1042CD, 40MHz) and to also get the CS1 pin. So what we have: 1 (Yellow): CS1 2 (blue/green): MOSI D0 (red): CLK Note that the overall pattern is the same (post 15) but the CS1 is acting WEIRD...
  8. J

    SPI data via DMA corrupt

    Seems like an interesting idea. (And you are correct in the fact that I have a low bandwidth scope, 25MHz, Picotech 2205A). Please correct me if I'm wrong here. But since the Teensy is the master (e.g. it determines the speed of the SPI bus), why would reflections on the bus cause wrong data...
  9. J

    SPI data via DMA corrupt

    I agree, the issue isn't (at the moment) with the signal levels. It's the transmission from the Teensy that does weird stuff.
  10. J

    SPI data via DMA corrupt

    As far as I know, no additional hardware is required. So, as requested, an Arduino Sketch. I'm using IDE version 2.3.8 and Teensy version 1.60.0. #include <Arduino.h> #include <SPI.h> #include <atomic> #define LOOP_DELAY 100 #define CS1_PIN 0 #define MOSI1_PIN 26 #define SCK1_PIN 27 #define...
  11. J

    SPI data via DMA corrupt

    Yes, I use the exact same code. In VSCode I just hit "upload" while connected to the test setup and to the PCB (not at the same time, I do swap cables). Unfortunately I can't use UART since there are shift registers connected to the SPI bus. The wires are a bit long, but if there is nothing...
  12. J

    SPI data via DMA corrupt

    The issue is that there is a clear difference in the signals SPI coming from the Teensy that is mounted on the PCB vs the one I have on the breadboard. Both teensy IC's are running the same code. (Also, sorry for being unclear. I have spend all day on this issue and I still don't have a clue...
  13. J

    SPI data via DMA corrupt

    I didn't pay attention to this at first but since I have so many issues, I wanted to rule out everything. When I took a closer look at the PCB I noticed something strange. Somehow the 2 versions are different!?!? My original on the breadboard The new on the PCB I get this from an...
  14. J

    SPI data via DMA corrupt

    So, just to check if I'm not crazy I switched back to my old breadboard and the results are interesting. On my PCB version the SPI always outputs 6 bytes with no consistency. On my breadboard it behaves as intended with the same code. Breadboard: PCB: Did I break the teensy or something?
  15. J

    SPI data via DMA corrupt

    Since it's work related I have to be a bit careful here. But there haven't been any changes in the pinout. Only hardware was added. Now that I read my message back I also realize that I forgot to add that I'm using a teensy 4.1 🤦‍♂️. Edit: The only new thing is the OE pin (Output Enable). But...
  16. J

    SPI data via DMA corrupt

    For my current project I want to send out data via the SPI bus using DMA. In my original tests on a prototyping board everything seemed fine. Now I switched to a PCB and somehow everything started breaking. I attached the full code to the post. Note that I'm using platformio to compile and...
Back
Top