Search results

  1. P

    Is it possible to change the frequency of the internal DCDC converter?

    Thanks. I already have it reasonably well shielded, but there are of course many signals crossing the shield walls. There are things that could be done to shield the inductor better and I might be forced to do so, but I still would prefer to move the EMI to less objectionable frequencies if...
  2. P

    Is it possible to change the frequency of the internal DCDC converter?

    I am working on a handheld receiver for the 80 m HAM band and specifically 3.5 to 3.6 MHz is of interest. The antenna is a ferrite core with a winding and as it is a handheld receiver, it is positioned just a few cm away from the Teensy Micromod that performs SDR functions and handles the user...
  3. P

    512 point FFT, maybe using latest CMSIS

    It seems like arm_rfft_fast_f32 is indeed supported! And it can handle the following FFT lengths: 32, 64, 128, 256, 512, 1024, 2048, 4096. This is great since it means I can write code that can easily support a few lengths (particularly 256, 512 and 1024) that differ by a factor of 2 rather...
  4. P

    512 point FFT, maybe using latest CMSIS

    Thanks Mark! You are right that my input data is real, so rfft functions would be a better choice than cfft. But I do want to use floats and the arm_rfft_init_f32/arm_rfft_f32 functions do still seem to have the radix4 limit, even though the corresponding q31 functions might not. I have not...
  5. P

    512 point FFT, maybe using latest CMSIS

    The analyze_fft1024.cpp/h class uses arm_cfft_radix4_q15 from an old version of CMSIS. There is a corresponding function for f32, which is what I am interested in here. In the old CMSIS functions, it seems like 256 and 1024 long FFTs are supported, but not length 512. I would like to do FFTs of...
  6. P

    Synchronizing the two I2S ports on Teensy 4.0

    Interesting. Maybe it would be a good idea to include this as a standard feature in the I2S audio blocks as it seems like at least the both of us, and presumably more people, sometimes have the need? I guess one non-breaking way of doing it would be to add a constructor that takes an argument...
  7. P

    Synchronizing the two I2S ports on Teensy 4.0

    I might have solved it or at least found a workaround. I added a state variable to my input_i2s_quad class that controls whether or not the isr() routine should call update_all() and copy data from the DMA buffer. The state is initialized so that update_all() is not called until the sketch...
  8. P

    Synchronizing the two I2S ports on Teensy 4.0

    The frequency shifting and filtering is done by code from the AudioSDR project, https://forum.pjrc.com/threads/57362-AudioSDR-A-single-Audio-block-SDR-(software-defined-radio)-processor-demodulator It is actually even a bit more complicated than what I described since it implements a phasing...
  9. P

    Synchronizing the two I2S ports on Teensy 4.0

    As I have probably already mentioned, measuring the phase difference between the two RF signals is pretty much the most important function of this project, so it is not just something I added as a quick debugging test. The way I do it in the Teensy code is as follows: Bandpass-filter the IF...
  10. P

    Synchronizing the two I2S ports on Teensy 4.0

    This might not be perfectly intuitive, but the math works out the way I tried to describe. So while I am indeed measuring the change in phase differences between the IF signals for two different LO frequencies, the result can be used to calculate the underlying undesired delay. I am pretty sure...
  11. P

    Synchronizing the two I2S ports on Teensy 4.0

    Sorry if I was unclear and thanks for asking for clarification. I have two WM8731 codecs. As you suggested, I rewired my board so that both are driven by the I2S1 clocks from the Teensy while the ADCDATA signals are received on different pins on the Teensy (pin 8 and pin 6) by my modified...
  12. P

    How to read an I2S 24bit signal?

    Not a complete answer, but perhaps a start: In this post: https://forum.pjrc.com/threads/68591-Synchronizing-the-two-I2S-ports-on-Teensy-4-0?p=293023#post293023 I have shared some code that sets up the DMA engine to receive two streams of 32-bit I2S stereo samples on a Teensy 4. There are some...
  13. P

    Synchronizing the two I2S ports on Teensy 4.0

    I was a bit too hasty in my conclusion of having solved the phase offset problem between the I2S inputs. It turns out that I often do not get the desired synchronization between the two I2S inputs. After some power-ups I do indeed get zero phase offset, but usually (80-90% of the time) I get...
  14. P

    Synchronizing the two I2S ports on Teensy 4.0

    Thanks everyone who helped! I patched my board so that both codecs are clocked by I2S1 while the ADCDATA signal from the second codec is connected to pin 6 of the T4. Fortunately, this pin was not used for anything critical. By using the quad I2S input block (or rather a modified version of it...
  15. P

    Synchronizing the two I2S ports on Teensy 4.0

    Neal, I think you will need to dig into the big "i.MX RT1060 Processor Reference Manual". Sections 11.7.353 - 11.7.356 tell you to which pins you can mux the SAI1 (I2S1) data input pins. E.g. RX_DATA1 can be muxed to either B1_00 or B0_10. If you look at the Teensy 4.0 schematic, you can see...
  16. P

    Synchronizing the two I2S ports on Teensy 4.0

    Thanks WMXZ! You are probably right that that is a better approach. I will look into it and probably patch the board and modify the software.
  17. P

    Synchronizing the two I2S ports on Teensy 4.0

    I am working on an SDR project where I need to sample and then synchronously process two IQ IF signals using WM8731 audio codecs. I have the codecs and RF parts working fine, but I have not yet found a way to reliably synchronize the two I2S buses and codecs so that my SDR code gets fed samples...
  18. P

    IRQ/ISR issues with my float version of AudioStream

    Thanks Chip. I clearly did not google enough before starting to write code. I will look into the solutions you point to. Per
  19. P

    IRQ/ISR issues with my float version of AudioStream

    Hi MarkT, Thanks for the suggestion. That might have been simpler to implement, but now that I have a working (but clunky) solution, I am reluctant to change to another clunky solution. I would prefer to polish this solution I have. If possible. Per
  20. P

    IRQ/ISR issues with my float version of AudioStream

    I decided to make a version of AudioStream that works with float32_t instead of int16_t for use in an SDR project based on a Teensy 4. I just got it to work, but not in a very elegant way. I need it to work alongside the normal AudioStream system, which required a bit of ugly hacking. I hope...
  21. P

    Issues when modifying input_i2s.cpp

    Hi Blackaddr, Thanks for your explanations. I mostly agree with your analysis and I do not expect any drastic improvements in weak signal SNR through my changes in the I2S functions. The one point that may make it worth shifting one or two bits when the signal is weak is that it pushes the...
  22. P

    Issues when modifying input_i2s.cpp

    The 16-bit values (instead of 24) was due to a mistake I made in the control_WM8731.cpp. I had changed to 32-bit mode in the master enable method, while I am using it in slave mode. The corrected code in the appropriate enable metod is: write(WM8731_REG_INTERFACE, 0x0E); // I2S, 32 bit, MCLK...
  23. P

    Issues when modifying input_i2s.cpp

    Some more findings: It seems like the DMA is for some reason running amok and not stopping at the end of the destination buffer. I added the following printout to the ISR to check the destination address of the DM Serial.print("isr "); // PM debug Serial.print(((uint8_t*)dma.TCD->DADDR) -...
  24. P

    Issues when modifying input_i2s.cpp

    Hi Pete, Thanks for your reply. That part of the code is taken without modification from input_i2s.cpp. I tried to add a return as you suggest (even another one for the case that allocation of new_left failed), but it made no difference. I allocate 50 audio blocks at the top of setup(). When...
  25. P

    Issues when modifying input_i2s.cpp

    I am trying to make a version of input_i2s.cpp for Teensy 4 that would allow me to capture all 24 bits from a WM8731 audio codec and shift the bits left by a selectable number of steps before using the resulting 16 MSBs as ordinary 16-bit Teensy audio. The application is an SDR radio and I...
  26. P

    How to access the internal RTC in a Teensy 4.0?

    Yes, I mostly appreciate the simplicity of the Arduino IDE and the minimal configuration and setup necessary to get up and running. But sometimes some of the things that are hidden and make simple cases work effortlessly causes problems when the project grows and knowledge of what is...
  27. P

    How to access the internal RTC in a Teensy 4.0?

    Thanks defragster for that piece of information. Good to know. I am more used to an ordinary C/C++ environment where there is perhaps more to learn to get started, but also less of the "helpful" Arduino magic that can let one down in unexpected ways when one goes beyond the simplest projects.
  28. P

    How to access the internal RTC in a Teensy 4.0?

    I had trouble compiling my code (in the Arduino environment) when I had placed the definition of getTeensy3Time() in a separate file. After some head scratching, I realized I had to explicitly #include "core_pins.h" for the compiler to recognize the Teensy3Clock object. This was not necessary...
Back
Top