Recent content by sicco

  1. S

    Issue with 16-bit ADC (ADS8354) communication with Teensy 4.1

    In the TI datasheet, the term SPI is carefully avoided... Not immediately clear what SPI mode is to be used. Sampling SDI on the falling edge, and clocking out SDO on the same falling edge. Then it's key you make sure that on the Teensy side the output pin for SCLK was already output, or at...
  2. S

    Multiple SPI at the same time

    Here's an example on how to do SPI masters on T4 with DMA. In a non blocking way. I also did a SPI DMA Slave library, but it looks like it's the master that you want here, and then three times in parallel, so SPI0, SPI1 and SPI2 hardware that is wired out on the Teensy 4.1. When using the...
  3. S

    Is there a faster alternative to Serial1.write? (4.1)

    1 us for a timer interrupt is very short. If the T4.1 runs at 600 MHz, then maybe you have a few cycles of CPU time before the next timer interrupt strikes. If running at 150 MHz CPU Speed, then expect no time left at all for the code in loop()... The call to serial2.write() takes quite a...
  4. S

    High temperature shutdown T4.1

    Thanks for this. So when it is case a), then where can I find and maybe tweak the code / parameters that make it do what it does now? Was I looking in the wrong place with that commented-out-code that I quoted?
  5. S

    High temperature shutdown T4.1

    I did as suggested. But the picture is not getting clear to me yet... I have a system in a test oven that ramps up from room temperature to 85 deg C. I display the result of tempmonGetTemp(), so what the CPU believes the RT1062 chip temperature is. When that approaches 90 deg C, I see the LDO...
  6. S

    High temperature shutdown T4.1

    The LEDs have 1k series R. I'm still not clear if the Teensy CPU, when it sees it's temperature is getting too high, does or does not disable the LDO (and then continues in some deep sleep mode when is has Vbat). Does it? And if it does, is that behavior enabled at startup by default, or only...
  7. S

    High temperature shutdown T4.1

    I'm exploring highest ambient temperature for a T4.1 system. With LEDs on the 5V and 3.3V rails, I can see that above ~75 deg C the 3.3V rail shuts down, while 5V rail stays on. Question: is that because the LDO itself goes into thermal shutdown, or is there code in the background that senses...
  8. S

    Writing Data to Teensy 4.1 microSD

    Writing to a file on the SD card is ‘blocking’. The main loop() will (can) ‘hang’ for up to tens if not hundreds of millisecond while doing transactions with the card. During that time, the Serial1 reception still works in parallel because it’s interrupt driven. But it only has a small buffer...
  9. S

    FFT not working properly

    Lavanya, what is SAMPLING_FREQUENCY? You’ve shared code where it was defined at 1024, 1000 and 4000. And you mentioned ‘hope’ as justifier for correct results eventually. But you let other code measure the time it takes to grab 30000 samples and found that to be roughly 1 second. So 33 us in...
  10. S

    ADXL - ADS1256 - Teensy 4.0 =>Python

    Your code seems to interrogate the ADC without using the waitDRDY(). The sampling rate is set by a 5 us delay, and the SPI bus clock speed? Are you trying to read out too fast?
  11. S

    FFT not working properly

    I think your original plan was to sample with 1000 Hz, and then do a FFT over 1024 samples, so that you get a frequency spectrum with 512 lines. Those lines correspond to 0 to 500 Hz, in steps of 1000/1024 Hz. The line that you wanted to see was i think ~155 Hz or so. What you have is something...
  12. S

    Teensyduino 1.59 Released

    I went for the update to 1.59. Code with HardwareSerial no longer compiled ok. I had things like this (only showing the troubled code - what the real app does is allowing two serial ports to take on the role of 'host communication serial port' on the fly): HardwareSerial *HostPort = NULL; void...
  13. S

    FFT not working properly

    Lavanya, what do you think is the time in between adc samples?? Try to print/plot the time domain samples before you compute the FFT. Then you will see what’s wrong I think…
  14. S

    FFT not working properly

    What do you think is the time in between adc samples?? I would say it is around 15 us. (10 + 5 + some cpu time). You‘ve not been clear on how you get ‘signal plot(5000 samples)’ data and how that relates to the 1024 samples in the code that you did share… The spectrum with two peaks (post #15)...
  15. S

    FFT not working properly

    You're using interrupt on ADC DRDY. Quite likely your Teensy now hangs waiting for the interrupt to come. But it doesn't come because the ADC isn't triggered yet? Why do you let the code wait for interrupts anyway? You're doing polling in your READ_ADC() are you not?
Back
Top