Search results

  1. spacewrench

    PCM1802 -> Teensy4.x -> PCM5102

    On the bad PCM1802s, do you get any response on Dout when you provide FSYNC (high), LRCK and BCK? I have 5 boards I bought end of December from MT Technology on AliExpress, and 2 built up with the FMT0-3.3V jumper don't do anything, but a third that I just powered with 5V and GND doesn't seem...
  2. spacewrench

    Parsing problem with strtok - teensy 3.2

    I don't have one of those displays, so I don't know how it works. But my guess is, once you send the string over with print() or println(), it keeps whatever information it needs (and you can throw away whatever you have). strtok() does modify the string, but all it's doing is putting a '\0'...
  3. spacewrench

    Parsing problem with strtok - teensy 3.2

    From a general C perspective, I'd guess you're running out of memory by strdup()ing a lot, but not free()ing them. I'm not sure what Arduino does for memory management, but it can't magically be creating more memory whenever it runs out! [edit to add:] There's no point to strdup()ing in your...
  4. spacewrench

    K66 Beta Test

    re: 192k/256k: my bad, I was looking at the wrong device flavor in the manual. Not blinking (bare metal) yet, but I'll get there eventually...
  5. spacewrench

    K66 Beta Test

    2xTeensy-3.5 arrived today, booted & blinked, and I was able to compile & upload sketches after installing the new Teensy Loader 1.31-boot-update and replacing boards.txt in the Arduino-1.6.9 installation directory. The linker config file (mk64fx512.ld) says there's only 192K of RAM, but spec...
  6. spacewrench

    Can we add a "Bare Metal" Forum?

    There are a few people (myself included) who waste their time twiddling bits in the various Teensy CPUs, even though there are perfectly good libraries to do the same things. We figure stuff out incrementally and probably get bitten by the same misunderstandings and errors in the documentation...
  7. spacewrench

    Help with bare metal USB device driver

    Do you have a writeup anywhere, Paul? I've just spent a couple of days with the Teensy-LC USB peripheral, and I've got the barest of bare minimum control going. But there's still some fragile stuff I don't understand. I wrote from scratch, referencing Kevin Cuzner's code and trying to make my...
  8. spacewrench

    Can't use LPTMR0 on teensy 3.0.

    ...and there it is: you have to turn on MCGIRCLK...MCG_C1 |= MCG_C1_IRCLKEN(1). Incidentally, it looks like you can clear the LPTMR F flag by writing 1 to it, as the documentation states. At least on the chip on my Teensy-LC.
  9. spacewrench

    Can't use LPTMR0 on teensy 3.0.

    I just put in a poor-man's breakpoint ("while (1) GPIOC->PTOR = (1 << 5);") in the ISR, and it never gets there. There's not even one interrupt happening.
  10. spacewrench

    Can't use LPTMR0 on teensy 3.0.

    LPTMR0 on Teensy-LC Does LPTMR not work with the PLL clock (48MHz, Teensy-LC)? I have this code: volatile uint32_t countdown; void delay_ms( uint32_t ms ) { SIM_SCGC5 |= SIM_SCGC5_LPTMR(1); LPTMR0_CSR = 0; // Reset / disable LPTMR0 NVIC_EnableIRQ( LPTMR0_IRQn )...
  11. spacewrench

    I2C / SMBus on Teensy-3.1: External pullups needed?

    Got it...the "Start 0->1" calls for a REstart between the two halves of the command. SCK is low between successive 9-bit interactions, so you have to raise it, then pull SDA low as a restart bit, then lower it again. Now that I know what successful SMBus communication looks like, I can try to...
  12. spacewrench

    The thrill of victory, followed swiftly by the agony of defeat!

    I got bit-bang SMBus running on my Power Playground board: the Teensy read the monitoring chip and got a reasonable voltage reading back out. The board was designed to work up to about 30V, so I stacked a 6V battery on top of the 12V I was using and hooked it up. (My Teensy supply circuit...
  13. spacewrench

    I2C / SMBus on Teensy-3.1: External pullups needed?

    Thanks...I soldered in some pullups and made a little progress with bitbanging code. I can apparently write to the slave registers, but my read code doesn't trigger the slave to deliver data onto SDA when I clock it. I'm using a PAC1720 current monitor, and the manual has this description of...
  14. spacewrench

    I2C / SMBus on Teensy-3.1: External pullups needed?

    I'm trying to get a Teensy-3.1 talking to an SMBus chip on a board I designed & built myself. I don't have pullups on the SCK and SDA lines; I was planning to bitbang with GPIO and use the internal pullups. (I don't need particularly high speed, and it's only the Teensy and one SMBus slave)...
  15. spacewrench

    Teensy-3 Clock Settings

    Rats, I figured this out a couple of years ago, but never wrote down the answer so I had to figure it out again just now. This time, though... ;-) I think I was confused by monitoring artifacts. I used a short delay loop / toggle GPIO to figure out what the clock speed is. But the Flash...
  16. spacewrench

    Step past Arduino enviroment?

    I like plain ol' GCC on Linux, but I'm old and use Emacs. I'd be a little leery of using a free version of a commercial tool. Maybe it's a reasonable choice for a Windows user, but if you're using Linux anyway, it seems like GCC would be the way to go.
  17. spacewrench

    FreeRTOS on Teensy (GCC, Linux)

    Here's stuff to drop into FreeRTOS that implements an interrupt-driven serial console, and you can add commands easily (right now, it knows "dump [addr [len]]"). Happy New Year!
  18. spacewrench

    FreeRTOS on Teensy (GCC, Linux)

    Here are some files that can be unpacked into FreeRTOS-7.3.0 and compiled to work on Teensy3. There are two sample programs: blinky and uart. Blinky does what you'd expect, but in a preemptive multitasking framework. Uart blinks and talks at 115200/8/N/1 on UART0. Hope you enjoy it!
  19. spacewrench

    Teensy-3 Clock Settings

    I'm trying to ensure that my clock settings are working as expected (I've stolen Paul's setup code and moved things around to fit nicely into the FreeRTOS framework). Things look good setting the PLL to 96MHz and then dividing down to 24MHz or 48MHz core & bus clocks, but when I execute the...
  20. spacewrench

    New version of FreeRTOS for Teensy 3.0, Due, and AVR boards

    Bill- I just started looking at getting FreeRTOS running on the Teensy-3. Your .zip file on Google Code appears to restructure FreeRTOS stuff to fit in the Arduino directory tree, but I don't use Arduino (just bare GCC on Linux). Do you have a version of your code that would fit as a...
  21. spacewrench

    Compile C++ program for the Teensy 3.0 (Lat/Long to MGRS coordinate conversion)

    It's possible to compile and run C++ code on a microcontroller like the Teensy3, but some C++ language features depend on fairly complex and heavyweight library support (for example, STL and exceptions). In your case, if the GeographicLib library actually uses exceptions and C++ strings (as...
  22. spacewrench

    Teensy2.0++ flash blank chip?

    I don't believe Paul has released the source code or binaries for his Half-Kay bootloader. However, I wrote a similar small USB bootloader a year or two ago and posted it at AVRFreaks.net. Paul's is better: he provides great support for several different platforms and several different...
  23. spacewrench

    Embedded "low cost" Webserver with "email SSL" mates with the Teensy 3.

    Another handy WiFi/Ethernet/USB/Linux platform is the Alfa AP121U. This is the hardware that's used for the WiFi Pineapple, and you can get the bare board from NewEgg for $35. (I don't work for any of these companies; I just have one AP121U and liked it enough to buy another. But I still want...
  24. spacewrench

    JTAG with (not of) Teensy

    True, there's several options (including cheap ones) but I have some Teensies! Anyway, it turns out that there's an OpenOCD driver for the BusPirate, which I suspect will happily talk to appropriate firmware on a Teensy, too. (I wouldn't be surprised if it's very similar to the BusBlaster...
  25. spacewrench

    JTAG with (not of) Teensy

    I have an old Olimex parallel-port Wiggler clone JTAG, but no easy-to-use parallel port any more. So I need a new JTAG dongle. Looking at the OpenOCD docs, they have a bit-bang driver that (apparently) is intended to control a simple JTAG device using about a dozen single-character commands...
  26. spacewrench

    Teensy as a Dongle

    Gotta Google for it...there's plenty of adapters out there, but it's a little difficult to find a reasonable price on a wide selection (so you can buy a bunch of random adapters and only pay shipping once!) Here's one from NewEgg...$1.69 plus free shipping. I think I'll buy a couple of these...
  27. spacewrench

    Compile GCC for teensy 3?

    Yeah, I found t-arm-elf in my adventures, and got it working with +/- thumb-interwork, IIRC. The problem I've always had is building the multilibs for +/-FPU, which makes 3 options: soft-FP, hard-FP with soft-FP calling conventions, and hard-FP with FPU register calling conventions. And what...
  28. spacewrench

    Freescale Header Files

    I was going to ask whether anyone knew of a set of Freescale header files, like the TI/Luminary Stellaris ones, that have mnemonic names for registers and bits...all I had was PJRC's mk20dx128.{c,h} files. But it turns out there is a Freescale version...
  29. spacewrench

    Compile GCC for teensy 3?

    GCC will tell you how it was configured (plus some other info) if you run gcc -v. From the ARM gcc in arduino-1.0.2: dhm@vanadium-crossdev:/usr/local/packages/arduino-1.0.2$ hardware/tools/arm-none-eabi/bin/arm-none-eabi-gcc -v Using built-in specs. Target: arm-none-eabi Configured with...
  30. spacewrench

    Getting started with raw C: GPIO initialization?

    Man, I hate complicated init code (that I didn't write myself!) I ended up commenting out everything I didn't understand in ResetHandler, and I now have a blinking LED. Woo hoo. Not sure what was keeping me from getting to main(), but also not much inclined to investigate. I have USB host...
  31. spacewrench

    Getting started with raw C: GPIO initialization?

    > Do you maybe mean GPIOC_PDDR = 1 << 5; Yes, yes I do. (I made the exact same mistake years ago with a Philips ARM processor. Why, oh why, do they have a DDR and a DIR?) > Are you using the ResetHandler() function? Yes, although I commented out the SysTick stuff and the __enable_irq()...
  32. spacewrench

    Getting started with raw C: GPIO initialization?

    Does anybody know how to use the Teensy3 in raw C mode (not using the Arduino stuff)? I have my compiler set up, and I'm using the mk20dx128.{c,h,ld} from the Arduino Teensy directory, but with the following code in my main(): PORTC_PCR5 = (0b001 << 8) | (1 << 6); GPIOC_PDIR = (1 << 5); //...
Back
Top