Jump to content
Forum sending old emails Read more... ×

developer_bt

Members
  • Content Count

    21
  • Joined

  • Last visited

  1. I tried with strong types, uint8_t about the values​​, and uint16_t and uint32_t for addresses but without success.
  2. I noticed a problem with the EEPROM library TM4C1294 Connected LaunchPad. I tried this example but without success: /* Example 31.1 - Arduino internal EEPROM demonstration http://tronixstuff.com/tutorials > chapter 31 | CC by-sa-nc */ #include <EEPROM.h> int zz; int EEsize = 1024; // size in bytes of your board's EEPROM void setup(){ Serial.begin(9600); randomSeed(analogRead(0)); } void loop(){ Serial.println("Writing random numbers..."); for (int i = 0; i < EEsize; i++){ zz=random(255); EEPROM.write(i, zz); } Serial.println(); for (int a=0; a<EEsize; a++){ zz = EEPROM.read(a); Serial.print("EEPROM position: "); Serial.print(a); Serial.print(" contains "); Serial.println(zz); delay(25); } } After reset only print "Writing random numbers ..." and freezes. The same code works with TM4C123. I use the latest library from GIT.
  3. Thank you, Yes will not be able to use the two simultaneously. Already ordered one and will test it. The experience I will share here
  4. Hello everyone! Are BOOSTXL-IOBKOUT is compatible with TM4C1294 Connected LaunchPad? Does anyone have experience with this BoosterPack, Can I use two of these with TM4C1294 Connected LaunchPad?
  5. developer_bt

    TM4C1294XL LaunchPad is blocked from WDT

    I managed to get back to normal with the latest LM Flash Programmer The procedure is as follows: - Select the appropriate lanchpad - Go to other utilities - disconnect the USB, - click unlock, - confirm with yes - on next MsgBox hold reset, connect - click ok, while still holding reset - release reset - power cycle board (and restart Flash tool?) - after that the programming works
  6. developer_bt

    TM4C1294XL LaunchPad is blocked from WDT

    I have a problem with Tiva C Series EK-TM4C1294XL LanchPad. .Totally is blocked: ( Only the green LED1 illuminates with low-intensity! I wanted to incorporate a greater value for WDT timer but I made a mistake and enter lower. I wanted to reset every 10 seconds. And I enter WatchdogReloadSet (WATCHDOG0_BASE, SysCtlClockGet () / 10000). Instead of WatchdogReloadSet (WATCHDOG0_BASE, SysCtlClockGet () * 10000). Now microcontroller is continuously in reset and can not be programmed with ICDI. Following message appears: Unable to find any ICDI devices. How to solve this problem? Code is from the link with small changes. #include <stdint.h> #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "driverlib/sysctl.h" #include "driverlib/eeprom.h" #include "driverlib/watchdog.h" #include "driverlib/interrupt.h" #define LED1 PN_1 int interval = 50; void setup() { pinMode(LED1, OUTPUT); //LED 1 } void loop() { //Watchdog Stuff SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0); SysCtlPeripheralReset(SYSCTL_PERIPH_WDOG0); if(WatchdogLockState(WATCHDOG0_BASE) == true) { WatchdogUnlock(WATCHDOG0_BASE); } //WatchdogReloadSet(WATCHDOG0_BASE, ROM_SysCtlClockGet()); WatchdogReloadSet(WATCHDOG0_BASE, SysCtlClockGet()/10000); // This is a mistake WatchdogResetEnable(WATCHDOG0_BASE); WatchdogEnable(WATCHDOG0_BASE); //IntMasterEnable(); //IntEnable(INT_WATCHDOG); while(1) { WatchdogIntClear(WATCHDOG0_BASE); //do stuff digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level) delay(interval); // wait for a second digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW delay(interval); // wait for a second } }
  7. That would be great! Hopefully soon Energia will get support for the new lanchpad
  8. Hello, This is a awesome! It is interesting to see this ported library for MSP430. Do you plan this library to be used for new lanchpad EK-TM4C1294XL?
  9. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    I found the problem! It is about configuring the system clock which is used to generate delays for functions: delay() and delayMicroseconds(). The change should be made in the core library wiring.c. You can use the change in the previous post but for a 80Mhz may simply make only the following changes: change wireing.c, (energia_dir)\hardware\lm4f\cores\lm4f\wiring.c // //SysTick is used for delay() and delayMicroseconds() // //ROM_SysTickPeriodSet(0x00FFFFFF); ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / 100); ROM_SysTickEnable(); I hope to someone would be of help
  10. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    Hello @@Rei Vilo! I have a logic analyzer, tomorrow or over the weekend will do testing and posting results. To inform you that I managed to knock off frequency of 40Mhz! Now I have a more stable readings, (delayMicroseconds(2); and if (counter > 6) were used). To reduce the frequency more of the following link : http://forum.stellarisiti.com/topic/1582-change-system-clock-stellaris-howto/ Reducing the frequency is as follows: First make a backup of the original files. 1) change board.txt (energia_dir)\hardware\lm4f\boards.txt ###################################################### # Tiva C TM4C1233H6PM 80MHz # with launchpad ###################################################### lpTivaC-1.name=Tiva C w/ TM4C1233H6PM (80MHz) lpTivaC-1.upload.maximum_size=262144 lpTivaC-1.build.mcu=cortex-m4 lpTivaC-1.build.f_cpu=80000000L lpTivaC-1.build.core=lm4f lpTivaC-1.build.variant=stellarpad lpTivaC-1.ldscript=lm4fcpp.ld ###################################################### # Tiva C TM4C1233H6PM 40MHz # with launchpad ###################################################### lpTivaC-2.name=Tiva C w/ TM4C1233H6PM (40MHz) lpTivaC-2.upload.maximum_size=262144 lpTivaC-2.build.mcu=cortex-m4 lpTivaC-2.build.f_cpu=40000000L lpTivaC-2.build.core=lm4f lpTivaC-2.build.variant=stellarpad lpTivaC-2.ldscript=lm4fcpp.ld 2) change wireing.c, (energia_dir)\hardware\lm4f\cores\lm4f\wiring.c /* ************************************************************************ * wiring.c * * Arduino core files for MSP430 * Copyright (c) 2012 Robert Wessels. All right reserved. * * *********************************************************************** Derived from: wiring.c - Partial implementation of the Wiring API for the ATmega8. Part of Arduino - http://www.arduino.cc/ Copyright (c) 2005-2006 David A. Mellis This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "Energia.h" #include "inc/hw_ints.h" #include "inc/hw_timer.h" #include "driverlib/rom.h" #include "driverlib/sysctl.h" #include "driverlib/timer.h" #define TICKS_PER_SECOND 100 #define TICK_PERIOD_MS (1000 / SYSTICKS_PER_SECOND) static unsigned long milliseconds = 0; void timerInit() { // // Run at system clock at 80MHz // #if F_CPU >= 80000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 50000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 40000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 25000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_8|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 16000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_12_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 8000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_25|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #elif F_CPU >= 4000000 ROM_SysCtlClockSet(SYSCTL_SYSDIV_50|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #else ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ| SYSCTL_OSC_MAIN); #endif // // SysTick is used for delay() and delayMicroseconds() // //ROM_SysTickPeriodSet(0x00FFFFFF); ROM_SysTickPeriodSet(ROM_SysCtlClockGet() / TICKS_PER_SECOND); ROM_SysTickEnable(); // //Initialize Timer5 to be used as time-tracker since beginning of time // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5); //not tied to launchpad pin ROM_TimerConfigure(TIMER5_BASE, TIMER_CFG_PERIODIC_UP); ROM_TimerLoadSet(TIMER5_BASE, TIMER_A, ROM_SysCtlClockGet()/1000); ROM_IntEnable(INT_TIMER5A); ROM_TimerIntEnable(TIMER5_BASE, TIMER_TIMA_TIMEOUT); ROM_TimerEnable(TIMER5_BASE, TIMER_A); ROM_IntMasterEnable(); } unsigned long micros(void) { volatile unsigned int conMz = ROM_SysCtlClockGet()/1000/1000; // return (milliseconds * 1000) + (HWREG(TIMER5_BASE + TIMER_O_TAV) / 80); return (milliseconds * 1000) + (HWREG(TIMER5_BASE + TIMER_O_TAV) / conMz); } unsigned long millis(void) { return milliseconds; } /* Delay for the given number of microseconds. Assumes a 1, 8 or 16 MHz clock. */ void delayMicroseconds(unsigned int us) { volatile unsigned int conMz = ROM_SysCtlClockGet()/1000/1000; volatile unsigned long elapsedTime; unsigned long startTime = HWREG(NVIC_ST_CURRENT); do{ elapsedTime = startTime-(HWREG(NVIC_ST_CURRENT) & 0x00FFFFFF); } // while(elapsedTime <= us*80); while(elapsedTime <= us*conMz ); } void delay(uint32_t milliseconds) { unsigned long i; for(i=0; i<milliseconds; i++){ delayMicroseconds(1000); } } void Timer5IntHandler(void) { ROM_TimerIntClear(TIMER5_BASE, TIMER_TIMA_TIMEOUT); milliseconds++; } Will you please test if this really works, in order to determine whether this is indeed the problem
  11. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    This library I tested with Arduino, msp430g2553 and MSP430F5529 launchpad and it works great. Most likely the problem is the speed of the CPU, TivaC running on 80Mhz. Do not use specific peripherals, so the problem is likely to program execution speed. How can I reduce the frequency of 16Mhz?
  12. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    I really surprising why it only happens with TivaC / Stellaris Launchpad, while normally works with msp430g2553 and MSP430F5529 launchpad. Do you have any idea what could be the problem?
  13. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    Thank you very much icserny! I tried your method. The results for delayMicroseconds(3); and if (counter > 10) are as follows: 6 6 6 6 6 6 6 17 17 6 17 17 17 6 7 6 6 6 6 6 6 6 6 6 18 17 6 18 18 7 18 6 18 6 6 17 6 7 18 17 40 1, B8, 0, DA, 93 =? 193 RH% 44.0 % oC 21.8 *C 6 7 6 6 6 6 6 17 17 6 18 17 17 6 6 6 6 6 6 6 6 6 6 5 18 18 6 18 18 6 18 6 18 6 6 17 6 6 18 17 40 1, B8, 0, DA, 93 =? 193 RH% 44.0 % oC 21.8 *C 6 6 6 6 6 6 6 17 17 6 17 17 17 6 6 6 6 6 7 6 6 6 6 6 17 17 6 17 17 6 18 6 18 6 6 17 6 6 18 18 40 1, B8, 0, DA, 93 =? 193 RH% 44.0 % oC 21.8 *C 6 7 6 6 6 6 6 17 17 17 6 6 6 17 6 6 6 6 6 6 6 6 6 6 17 18 6 17 17 6 17 6 17 6 6 18 18 18 18 17 40 1, C4, 0, DA, 9F =? 19F RH% 45.2 % oC 21.8 *C 6 7 6 6 6 6 6 17 17 6 18 17 17 6 6 6 6 6 6 6 6 6 6 5 18 18 6 18 18 6 18 6 18 6 6 17 6 6 18 17 40 1, B8, 0, DA, 93 =? 193 RH% 44.0 % oC 21.8 *C 6 6 6 6 6 6 6 17 17 6 17 17 17 6 7 6 6 6 6 6 6 6 6 6 18 17 6 18 18 7 18 6 18 6 6 17 6 7 18 17 40 1, B8, 0, DA, 93 =? 193 RH% 44.0 % oC 21.8 *C For a long time now I have stable readings in comparison with the previous time, but still there are. However using the MSP430 with the following settings has no peak value of humidity. Will someone please try to Stellaris / TivaC.
  14. developer_bt

    SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia

    Hello, Why when using a Stellaris / TivaC lanchpad appears oscillation in the value of the humidity? ?o work with Stellaris / TivaC I made the following changes: // Core library - MCU-based #include "Energia.h" while (digitalRead(_pin) == laststate) { counter++; delayMicroseconds(2); //change! if (counter == 255) { break; } } if ((i >= 4) && (i%2 == 0)) { // shove each bit into the storage bytes data[j/8] <<= 1; if (counter > 12) //change! data[j/8] |= 1; j++; } } Code is the following: #include "Energia.h" // Include application, user and local libraries #include "DHT22_430.h" #define DHTPIN PD_0 //Stellaris //#define DHTPIN P1_4 //MSP430 DHT22 mySensor(DHTPIN); boolean flag; void setup() { Serial.begin(9600); Serial.println("\n\n\n*** DHT22 test starts"); Serial.println("PUSH2 to end"); pinMode(PUSH2, INPUT_PULLUP); mySensor.begin(); } void loop() { delay(2000); // for Stellaris a lower value has a greater deviation // Reading temperature or humidity takes about 250 milliseconds! // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) flag = mySensor.get(); int32_t h = mySensor.humidityX10(); int32_t t = mySensor.temperatureX10(); // check if returns are valid, if they are NaN (not a number) then something went wrong! if (!flag) { Serial.println("Failed to read from DHT"); } else { Serial.print(h); Serial.print(","); Serial.println(t); } if (digitalRead(PUSH2)==LOW) { Serial.println("\n\n*** End"); Serial.end(); while(true); // endless loop } } The deviation is more than 1% and sometimes more . I've tried multiple lanchpad: MSP430 (2530), MSP430 (5529) but the problem appears only with Stellaris and TivaC! Are problem is the library or there are too many noise power from the PC? I do not have an oscilloscope to see what the problem is. I know that this is MSP430 forum but will ask if anyone has time to test the library with Stellaris. The output is as follows. MSP430: 491,222 494,222 496,222 496,222 495,222 494,222 494,222 492,222 491,222 491,222 490,222 490,222 490,222 491,222 490,222 489,222 489,222 489,222 490,222 490,222 490,222 489,222 489,222 489,222 490,222 491,221 492,222 493,221 494,221 494,222 494,221 493,222 493,221 494,222 494,222 493,221 491,221 490,221 490,221 490,221 490,221 489,221 490,221 490,221 491,221 492,221 492,221 492,221 493,221 494,221 495,221 494,221 494,221 493,221 492,220 492,221 492,221 493,221 494,221 495,221 TivaC: 492,221 494,221 495,221 494,221 493,221 506,221 498,221 499,221 499,221 499,221 498,221 511,221 499,221 499,221 498,221 497,221 495,221 504,221 496,221 497,221 497,221 495,221 494,221 503,221 492,221 491,221 492,221 495,221 494,221 505,221 495,221 495,221 497,221 496,221 497,221 508,221 501,221 500,221 502,221 500,221 498,221 506,221 494,221 495,221 494,222 492,221 491,221 501,221 489,221 490,221 493,221 494,221 494,222 503,221 492,221 493,221 493,221 492,222 490,222 501,221 491,221 490,221 490,221 489,221 493,221 502,221 491,221 490,221 489,221 489,221 487,221 499,221 491,221 Thank you in advance
  15. developer_bt

    [Energia Library] Nordic nRF24L01+ library

    Hello Spirilis, I did test with the logic analyzer, so when you have time look at results. Testing is done for Arduino RX and Stellaris RX examples. Files of Saleae software are found in .zip attachment. Saleae logic result.zip
×