Search results

  1. F

    Want to reconfigure Teensy3 FlexRam/FlexNVM for EEPROM and data flash

    Hey @tigercat, When I first was experimenting with this a while ago Paul had a different version of his loader running in the MK54 chip. That version used to do its own "erase all" of the main processor chip. As you found out, an "erase all" erased all the FLASH and NVRAM and FLEXRAM and Data...
  2. F

    Serial.flush?

    Hi Duff, So, from everything I found it's a Windows issue that you have to close a virtual serial USB connection before it enumerates again or else the Windows driver gets hung up. Supposedly no way around it. So there isn't a way to keep the Arduino serial monitor open (or any host program)...
  3. F

    Serial.flush?

    I did find a Freescale post about resetting a Windows USB connection: https://community.freescale.com/message/436041 I find if I include: USB0_CONTROL &= ~USB_CONTROL_DPPULLUPNONOTG; Statement in my code that disables USB that Windows does close out the connection before I reset the processor...
  4. F

    Updates to new yield.cpp code

    Hey Steve, From what I know serialEvent is an Arduino concept where you can code a function of that name to handle serial data. It's supposed to be called once per "loop()" iteration. It wasn't in TeensyDuino till recently. The yield code that was added just provides a mechanism for invoking...
  5. F

    Serial.flush?

    Hey @duff. It's funny how I seem to keep finding you addressing the same things I have questions about. I'm trying to get USB to work reliably when transitioning through low power and reset situations. I find if I wait enough time before shutting the USB device down and enabling low power...
  6. F

    Updates to new yield.cpp code

    Paul, I'm merging in changes from TeensyDuino 1.20 release for Teensy 3.x into my baseline code.. I saw that there is new yield.cpp code. There was a comment in that code that asked if it needed to be atomic. Maybe the code doesn't absolutely need to be atomic depending on how perfectly...
  7. F

    I don't think critical sections work (interrupt locking)

    Hi all, I've seen this issue resurface as part of the discussions about the new TeensyDuino release. After the whole discussion above I did follow up on the post from @tni about the Posix discussions of nested locking. They were very interesting yet didn't change my mind based on 30+ years of...
  8. F

    Teensyduino 1.20 Release Candidate #1 Available

    Sometimesyou need to fix nested interrupt locking Hi, I saw this post looking through the release notes. I also saw Paul closed your issue seeming to say it wasn't broken. This notion of nested interrupt locking has come up before in this forum. And there seems to be this notion that because...
  9. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Better results with better tools and more drastic measures Neil, Thanks for the great link! And damn, how much easier things are with the right tools! That guy Eric Styger is using the Freescale Code Warrior toolset with their processor expert support. And it allows you to use a nice Gui to...
  10. F

    Teensy 3.0 Watchdog Timer

    Hi @martinayotte, You want to use the watchdog but not right from the start it sounds like. So, the deal is that you have to update the watchdog right when the processor starts if you want to change it. There is code in Paul's mk20dx128.c source file for the reset handler that gets run first...
  11. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Just an update. So, I was trying to come up with a super low power state that I could put the Teensy 3.0 processor into when our LiON battery got too low so that it would stop discharging until plugged into a charger. After much fiddling around and searching the Freescale Kinetis forums and...
  12. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Hey @duff, I'm sort of wondering how you get 10uA too. I want to throw my board into real lower power state when battery voltage drops and leave it there until USB charger plugged in so that I don't overdischarge the LiON battery we're using and wreck it. I've put the processor into VLLS0 power...
  13. F

    Safe to hook LiON battery to Vbat?

    @Jp3141, I'm using the Teensy 3.0 so the older data sheet. But I think the section references I give are the same as for the Teensy 3.1 data sheet you quote. Section 4.4 of data sheet has the full operating range of Vregin input to processor. It can go from -.3V to 6V. Of course, I realize...
  14. F

    Safe to hook LiON battery to Vbat?

    Thanks for the suggestion Michael but we have the LiON battery to power the whole board too. I like having the VBat connection from the battery in addition to having it hooked to Vin so that I can shut down the processor when I detect battery getting low but still have the RTC keeping time until...
  15. F

    Safe to hook LiON battery to Vbat?

    Hi, I think this is a question for Paul. I have a Teensy 3.0 and I want to protect the RTC from power loss by connecting our LiON battery to the Vbat pin. And that is what I have done on my first prototype. But before I build up more boards I'm wondering if what I did is "safe" and couldn't harm...
  16. F

    Teensy 3.1 based custom design?

    Wow, interesting post. I'm an "older" SW developer working with some "kids" to bring a new product to market. They went through a HAXLR8R accelerator program a few months ago over in China where you learn how to do HW products. I've been working for about a year on the SW using a Teensy 3.0, a...
  17. F

    Teensy 3.1 - Tying Pin#33 (pta4) low freezes teensy.

    I have been trying to understand what pin D33 does and what it can be used for on the Teensy 3.x boards. And I think there might be some slightly incorrect information floating around in the forum on it. Not what Paul has said (because Paul REALLY knows his boards). But I think maybe a slight...
  18. F

    Teensy 3.0 RTC drift

    Hey Paul, Thanks for the quick answer. And as I would expect from all the great design in your products it matches the other information I had found. So I now know that if we use other RTC oscillators on our other boards I'll set the capacitance setting in RTC_CR to 2*CL-5. Great to have that...
  19. F

    Teensy 3.0 RTC drift

    So, I actually sort of found my own answer to my question. The post at: http://www.lpcware.com/content/faq/how-calculate-value-crystal-load-capacitors Talks about this exact issue. In Table 16 of the data sheet for the processor used on the Teensy3 it says that the "typical" stray capacitance is...
  20. F

    Teensy 3.0 RTC drift

    I have to say I love using the Teensy3 because it does so many things well and there is great info in this forum to help figure things out. I was just trying to determine how the RTC oscillator capacitance load should be set and found this post. It covers the exact issue I'm interested in and...
  21. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Finally achieved low (enough) power! @duff, I was going crazy trying to chase that low power issue I was having and posted about earlier. I tried your suggestion to use your VLPW code and found that it sometimes ran at about .8mA like you said right after download but if I unplugged and...
  22. F

    Teensyduino 1.18 Released

    Paul, I was having a low power issue with the 1.16 release I was using on my Teensy 3.0. I was finding what I think was that the MIN54 was getting hung up drawing about 3mA of power in some cases when I put the main processor into the VLPW mode I tried but not the LLW mode. I stripped out...
  23. F

    Minor fix in 3.18

    Paul, I happened to notice that the code in serial3.c didn't use new IRQ_PRIORITY in NVIC_SET_PRIORITY call.
  24. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Hi @duff, I've been away from power issues with my app for a while and doing things like adding Bluetooth LE. I'm still currently using LLS low power mode. But I found the watchdog wasn't working. I found a bug with Teensy code for the watchdog but those are covered over in...
  25. F

    Teensy 3.0 Watchdog Timer

    More watchdog details Hi @reckut, I took a little more time to look at what you did. I've been doing a lot of watchdog stuff the past week working with some Freescale engineers and have a good handle on it. First off, the code that runs at the beginning of ResetHandler in mk20dx128.c has to be...
  26. F

    Teensy 3.0 Watchdog Timer

    Hey, I just started post http://forum.pjrc.com/threads/25391-Watchdog-initialization-problem earlier today not knowing about this one. I've been trying to get LPO watchdog to work with some engineers from Freescale. Turns out the main problem was initialization problem in the Teensy ResetHandler...
  27. F

    Watchdog initialization problem

    There is a post at https://community.freescale.com/message/382312 that has been in progress for a bit on using the LPO with the watchdog. I figured out how to get it to work yesterday but haven't posted the details. Main issue was fix I presented here.
  28. F

    Watchdog initialization problem

    Hi all, I've been trying to get the Teensy3.0 watchdog timer to work with the low power oscillator (LPO) clock source. I was having no luck until I got hooked up to a Freescale support engineer who gave me some simple example code he said "worked for him". Well even that simple code didn't work...
  29. F

    Want to reconfigure Teensy3 FlexRam/FlexNVM for EEPROM and data flash

    Paul, I guess I'm still a bit confused about the configuration details at startup. I have code that replaces your eeprom.c code because I want a configuration with EEPROM and some Flex NVM for Flash data storage. I'm using release 1.16 of Teensyduino with a Teensy3. I find that if I first run a...
  30. F

    Want to reconfigure Teensy3 FlexRam/FlexNVM for EEPROM and data flash

    Hey Paul, Right on! Excellent details to know and sounds like a great solution. Thanks for the info! I'm now "good to go" on this issue.
  31. F

    Want to reconfigure Teensy3 FlexRam/FlexNVM for EEPROM and data flash

    Paul, Thanks for the info! So, the upload process still uses the "erase all blocks" command. And then the next time my program starts the standard eeprom_init code comes in and sets things up for 2KB of EEPROM. So I can make sure my init routine for data flash setup runs before eeprom_init and...
  32. F

    Want to reconfigure Teensy3 FlexRam/FlexNVM for EEPROM and data flash

    Hi all, I'm trying to figure out how to switch my Teensy3 from the "standard" EEPROM setup Paul provides to a custom one. The standard setup is that the 2KB Flexram and 32KB of FlexNVM are used together to provide 2KB of EEPROM. I wanted to switch to have 8KB of Data Flash and then use the other...
  33. F

    How to change Teensy 3.0 PRODUCT_NAME ?

    I'm trying to figure out the "right" way to go with a potential product we are basing on the Teensy3. We will want data offload over USB by users who certainly won't have the TeensyDuino environment installed including the .inf files Paul's installer adds on Windows to allow the virtual serial...
  34. F

    C++ constructors for static objects in functions don't seem to be called.

    I had some code that was working just fine measuring elapsed time using C++ elapsedMillis objects that were defined as static objects at file level scope (ie outside any functions). To improve maintainability I moved some of the static elapsed time objects into the functions they were associated...
  35. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    High power in LLS Paul talked about how to check loader version in http://forum.pjrc.com/threads/23880-Teensyduino-1-15-Released. The 7ma certainly sounds like the Min54 is still running. I get .5mA in LLS mode but have other peripherals like an LCD screen running too. You said you were doing...
  36. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Using llwu code for LLS low power operation In case anyone wanted to use the llwu code I posted earlier I thought I would provide the code we use for entering LLS mode as a sample of using the LLWU code. I should also mention that we only use LLS low power mode and not any of the VLLSx low...
  37. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    LLWU use for low power modes @Roger Roger, You asked about checking out pin 26. I didn't check it out explicitly because we don't use any of those pins you have to solder to the bottom pads for. But I have no reason not to think it would work just like the others. I'm using LLS mode for low...
  38. F

    ADC problems in BSP analog.c I think.

    Paul, I'm adapting the ADC code you provide in the BSP analog.c source file for my own application. Primarily I need to change it to support the LLS low power mode which resets the ADC each time you go to sleep. I found some issues in working with the code and testing it. 1) The way you trigger...
  39. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Since nobody else has replied I'll take a shot at mentioning some things. First, you can't hook a battery to the 3.3V pin. It's an output from the internal regulator. We too have a battery operated application that can be hooked up or not to USB. The way we have hooked it up (and the way I think...
  40. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    @duff, I think I am going to give up on VLPS mode and just use LLS. Like you reminded me, it exits via an interrupt so no big recovery effort. It's missing 1 or 2 wakeup sources I would have liked that VLPS has (like serial and USB input) but I think I can deal with that. Thanks for the advice...
  41. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Going into VLPS mode @duff said So, I saw that processor errata e4481 said: They say use VLPS instead of STOP mode. Besides, the power use for STOP mode is supposed to be higher by a fair bit. So, I had been going into BLPE power mode first before going into VLPS but when that didn't work I...
  42. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Hi, has anyone gotten the Very Low Power Stop (VLPS) mode to work? I've been messing with this for about a week and having real trouble. Sometimes the code works and I can stop the processor with reduced power and then wake up due to an interrupt coming in. But much of the time I get a hard...
  43. F

    I don't think critical sections work (interrupt locking)

    @paul, Again, I agree with your analysis. You write wonderful code and clearly know your stuff. Not everyone has the same breadth of experience though so I thought it was useful to make sure things were done right. And there are serious bugs lurking in incorrect use of the standard critical...
  44. F

    I don't think critical sections work (interrupt locking)

    @paul, Thanks, as always, for the nice explanation. The ARM Cortex M4 interrupt model is pretty slick and sophisticated. And, even though it seems no use is made with the current code of the flexible priority scheme, it does seem pretty nice that you could set up priorities to allow special...
  45. F

    I don't think critical sections work (interrupt locking)

    @tni I like your characterization of the problem I am talking about as a recursive mutex problem. Because the use of interrupt locking is really just like a simple mutex to protect critical sections. And I agree that recursive mutexes should be avoided where possible. And I agree that you have...
  46. F

    I don't think critical sections work (interrupt locking)

    Just realized that I can't just use my old Cortex M3 critical section code. Any critical section code that tracks critical section nesting levels only works right if ALL critical sections use the same enter/exit functions so that nesting is properly tracked. This would mean all the T3 code and...
  47. F

    I don't think critical sections work (interrupt locking)

    I'm trying to port some code I've used on many other systems/OSes. It uses critical sections to safeguard manipulating critical data. When I look at the Teensy 3 code it looks like the code simply uses __disable_irq and __enable_irq to surround critical sections. The problem is that those...
  48. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Paul, I am working on trying to get VLPS low power mode to work. I tried using code from Freescale MQX RTOS but it wasn't reliable. Now I'm using code from the App Note 4470. But I have run into one potential problem based on the Teensy 3 board design. The issue has to do with errata e4473 for...
  49. F

    Low Power "Green" Battery Operation Solutions For The Teensy 3.

    Hi, App note 4503 section 9.1 and the associated table 1 show the latency getting out of different low power modes. Usually it's the interrupt latency (which they state is 12 cycles for a K device like we are using). Some modes add an extra 2 to 4 usec. So I still think it would be a win to go...
  50. F

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

    In the old days I used to do defense projects for big systems using multiple processors with lots of memory. When they came along we started using VME boards instead. These processors had lots of memory compared to embedded processors like the Teensy and were sort of completely different beasts...
Back
Top