Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: ossi

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    12
    Views
    175

    The following program is also interesting ...

    The following program is also interesting


    int led = 13;

    int k ;

    void setup() {
    pinMode(led, OUTPUT);
    delay(2000) ;
  2. Replies
    12
    Views
    175

    I got the e-mail that Frank B. posted a reply to...

    I got the e-mail that Frank B. posted a reply to this thread:
    Frank B has just replied to a thread you have subscribed to entitled - Timing of nop-delayloops on Teensy4.0 - in the Technical Support...
  3. Replies
    12
    Views
    175

    If you let the attached program run on a teensy...

    If you let the attached program run on a teensy 4.0 the result is 4 cycles per loop. That means that pin-toggle plus loop-counting is done in 4 cycles and no NOPs seem to get inserted. If you insert...
  4. Replies
    12
    Views
    175

    If I let nopLoop5() run I see sometimes short...

    If I let nopLoop5() run I see sometimes short pauses in the pin13 waveform. But that seems to be due to interrupts by the TEENSY system. If I insert a cli() to eliminate these interrupts I see a...
  5. Replies
    12
    Views
    175

    I find it rather interesting that in case of...

    I find it rather interesting that in case of nopLoop5() the compiler inserts the NOPs into the generated code and pipelining or whatever thing at runtime eliminates the NOPs on the long run.
  6. Replies
    12
    Views
    175

    Timing of nop-delayloops on Teensy4.0

    I am currently measuring the execution times of simple delay loops. I toggle pin 13 and measure the execution times using an oscilloscope. Clock frequency is 600 MHz. The function nopLoopn() contains...
  7. Precision of arithmetic in C (Teensy 4.0 double vs. float)

    float f1,f2 ;
    f2=f1+f2 ;
    f2=sin(f1) ;

    Is it right that float arithmetic in C is generally done with double precision? Looking at the code generated for the Teensy 4.0 I get this...
  8. Replies
    1
    Views
    40

    The issue has been solved: void show(){ ...

    The issue has been solved:



    void show(){
    Serial.printf("_heap_end =%018XH \n", &_heap_end) ;
    Serial.printf("_heap_start =%018XH \n", &_heap_start) ;
    }

    the address operator & was...
  9. Replies
    1
    Views
    40

    Getting heap_size at runtime

    I want to get the heap_size at runtime. After having a look at the .sym file of my sketch I thought the following approach should work:


    extern unsigned long _heap_end ;
    extern unsigned long...
  10. Replies
    8
    Views
    211

    Thanks a lot for your help. My understanding of...

    Thanks a lot for your help. My understanding of the memory layout is getting much better!
  11. Replies
    8
    Views
    211

    At wich time is the code placed at the ITCM...

    At wich time is the code placed at the ITCM region? Is it done at compile/load time or at runtime?
  12. Replies
    8
    Views
    211

    Do you have an idea how I can demonstrate...

    Do you have an idea how I can demonstrate (verify) that code is executed from low RAM1?
  13. Replies
    8
    Views
    211

    FASTRUN feature on Teensy 4.0

    Is the FASTRUN feature available on the Teensy 4.0? The compiler accepts the FASTRUN attribute. Is there an example that demonstrates this feature ?
  14. OLED display 128x64 ADA-938 SPI on Teensy4.0 does not work

    I dont get the ADA-938 OLED display to work with the Teensy4.0. If I use the SSD1306.zip from https://www.pjrc.com/teensy/td_libs_SSD1306.html I get a lot of compiler errors. If I use the newest...
  15. Replies
    2
    Views
    93

    Teensy 4.0 memory allocation

    I want to get the amount of free memory and the actual values of the stackpointer and heap-allocator.
    I tried the following program:


    int staticVar ;

    uint32_t FreeMem(){
    uint32_t...
  16. Replies
    5
    Views
    113

    I followed Pauls advice and tried objdump from...

    I followed Pauls advice and tried objdump from the new toolchain (GNU Tools Arm Embedded\9 2019-q4-major). It seems to work perfectly. So thanks for the advice. Thanks also to luni for the hint to...
  17. Replies
    5
    Views
    113

    I have downloaded and executed the...

    I have downloaded and executed the toolchain-install-exe. That did not change anything: Still the wrong result.
    Do I have to make special steps (beside execute of the install file) to install the...
  18. Replies
    5
    Views
    113

    Code generated for Teensy40

    I want to get an insight into the code that is generated by the compiler. Since I am quite new to ARM assembly code I have some questions. I compile the following (nosense) test-program on the...
  19. Replies
    3
    Views
    184

    @vjmuzik: Your link was of great help! I did not...

    @vjmuzik: Your link was of great help! I did not read/write the registers with the right size (32,16,8 bit). Now it works.
    @manitou: I know that I can use the names for the periperals, but I wanted...
  20. Replies
    3
    Views
    184

    Direct register access using address

    On the Teensy 3.6 the register CMT_PPS has the address 0x4006200A according to the datasheet. How can I access the CMT_PPS register using this address?
  21. Replies
    0
    Views
    78

    direct timer register access

    I want to directly access timer-registers on the teensy36. If I remove the two lines showHex(...) the program runs (prints every 0.5 seconds a ever increasing number).
    If I want to access then...
  22. Thread: direct pin access

    by ossi
    Replies
    1
    Views
    100

    direct pin access

    I want to toggle directly the LED pin (pin 13) without using any library routines or any predifined constants. Has someone an example? Is it right that the pin13-toggle is on port 401B8000+4000+8C on...
  23. Replies
    2
    Views
    144

    @DerekR: Thanks for your hint. My sawtooth has...

    @DerekR: Thanks for your hint. My sawtooth has 1.4Hz and a 2u2+10k highpass has 7Hz cutoff frequency. So my frequency is too low. If I increase the sawtooth frequency to 100Hz everything is ok!
  24. Replies
    2
    Views
    144

    SGTL5000 LineOut Impedance

    I generate a sawtooth waveform and output it via the SGTL5000 Audio Board (see code below). The LineOut output seems to have a quite large impedance. When I connect the output pin with ground via a...
  25. Replies
    3
    Views
    269

    Thanks, I will have a look into dspinst.h and...

    Thanks,
    I will have a look into dspinst.h and the audio lib.
  26. Replies
    3
    Views
    269

    assembly language with teensyduino

    Is it possible to include assmbly language in teensyduino projects?
  27. Replies
    1
    Views
    184

    Teensy 3.6 CPU in Thumb or ARM mode?

    Is the CPU of the Teensy 3.6 Board running in Thumb mode or in ARM mode ?
  28. Replies
    0
    Views
    128

    instruction timing for Teensy36

    #include <arm_math.h>
    #include <arm_const_structs.h>

    // instruction times for cortex M4
    // http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0439b/CHDDIGAC.html

    #define nn...
  29. Replies
    2
    Views
    137

    @KurtE Seems that was the error. Thanks a lot....

    @KurtE
    Seems that was the error. Thanks a lot.
    Normally I put those arrays in the static section so that I get an error from the compiler if I use more than 256k. But this time I put in onto the...
  30. Replies
    2
    Views
    137

    Teensuino strang behaviour

    The following program (Teensy36) :

    void setup() {
    Serial.begin(115200);
    for(int k=0 ; k<6 ; k++){
    delay(50);
    delay(100);
    }
    test1() ;
    }
  31. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    in analog.c i made tzhe following change: ...

    in analog.c i made tzhe following change:

    //#elif F_BUS == 60000000
    // #define ADC_CFG1_16BIT ADC_CFG1_ADIV(2) + ADC_CFG1_ADICLK(1) // 7.5 MHz
    // #define ADC_CFG1_12BIT ADC_CFG1_ADIV(1) +...
  32. Replies
    274
    Views
    62,481

    @Frank Have you ever considered using ADCs and...

    @Frank
    Have you ever considered using ADCs and DACs instead of SGTL5000. At least there should be no twinpeaks problem.
  33. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    It seems changing the CFG1 setting in analog.c...

    It seems changing the CFG1 setting in analog.c and pdb_period in pdb.h does the trick.
    Thanks.
  34. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    In input_adcs.cpp I see where the trigger rate of...

    In input_adcs.cpp I see where the trigger rate of the ADCs is set to 44100 but I can not see where the ADC conversion clock is specified.
    Playing with analogReadAveraging(x) had no positive effect.
  35. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    The Method to change the I2S clock only works for...

    The Method to change the I2S clock only works for the SGTL5000 as far as I see. The DAC and ADC timing is specified by the parameter PDB_PERIOD from pdb.h. Changing this from 1360 to 3000 makes the...
  36. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    So far I found that I had to change the constant...

    So far I found that I had to change the constant 1360 in pdb.h


    #elif F_BUS == 60000000
    #define PDB_PERIOD (1360-1)


    I could make the ADC clock a little slower, but not faster ( I want to...
  37. Thread: Change SampleRate

    by ossi
    Replies
    11
    Views
    601

    Change SampleRate

    I have a setup consisting of the DACs as source. These deliver their data via a recordQueue to my program. My program does some filtering and puts the output data to playQueues. The data then goes to...
  38. Replies
    2
    Views
    195

    That would mean that all stereo applications (as...

    That would mean that all stereo applications (as well as SDR applications) suffer from this erratic behaviour ?
  39. Replies
    2
    Views
    195

    Left and Right Channels not in Sync ?

    The program given below shows a behaviour that I don't understand. The Intention is as follows: Data from Left and Right channel ADCs in SGTL5000 is directly copied to the Left and Right DACs in...
  40. The issue has been solved in another forum:...

    The issue has been solved in another forum: random(maxval) returns an uint32_t value, not a long as specified for Arduino
    The types for the teensy are
    int32_t random(void);
    uint32_t...
  41. I would have expected the following for the line ...

    I would have expected the following for the line x=random(10)-5 :
    random returns a long (says the documentation), thus the 5 should also be treated as a long. Then the difference random(10)-5...
  42. The example comes from a FFT program where I...

    The example comes from a FFT program where I wanted to initialize a double-vector with random data.
    in my original example
    double x[NFFT]
    x[k]=random(10)-5 ;
    the occuring big numbers can...
  43. Replies
    13
    Views
    696

    I have now located the boards.txt file. I am...

    I have now located the boards.txt file. I am totally lost with so many options. Where can I put compile options or the objdump options ?
  44. Random function in expression gives wrong values

    Running the code shown below on a Teensy 36 gives big integers as result where negative values should occur. Output of the code is shown below also. If the line with "..random.." is replaced by one...
  45. Replies
    13
    Views
    696

    Is it possible to change the compile options in...

    Is it possible to change the compile options in the teensyino environment?
  46. Replies
    13
    Views
    696

    Hi Paul, thanks a lot for your help and the great...

    Hi Paul, thanks a lot for your help and the great teensy stuff.

    A comment to the BL instruction: You probably are too young to have learnt the IBM360 assembly :) . When I went to university around...
  47. Replies
    13
    Views
    696

    Thanks, that was exactly the information I...

    Thanks, that was exactly the information I needed. Seems I have opened Pandora's box somehow. Now I have to learn ARM Code and see what an optimizing compiler generates.
  48. Replies
    13
    Views
    696

    Generated Code of teensy3.6

    Is it possible to have a look onto the code that teensyduino generates? I want to see what optimizations are done.
  49. Replies
    9
    Views
    485

    @Paul: Thank you for your explanation. Have you...

    @Paul: Thank you for your explanation. Have you tested (by simulation) that noise shaping with biquads is really helpful? Perhaps I will try such an simulation.
  50. Replies
    2
    Views
    233

    Does that mean that I generated the data too...

    Does that mean that I generated the data too fast? Since I generate data as it comes in from the record-queue I had expected that there is alway enough space in the playQueue to cope with the...
Results 1 to 50 of 60
Page 1 of 2 1 2