Jump to content
43oh

energia

Members
  • Content Count

    1,252
  • Joined

  • Last visited

  • Days Won

    63

Reputation Activity

  1. Like
    energia reacted to Rei Vilo in CC3200: Saving 500 MB Binary Files to Flash Memory   
    Check the SLFS library at http://forum.43oh.com/topic/5972-non-volatile-memory-options-for-cc3200/page-2
  2. Like
    energia reacted to NurseBob in Nokia 5110 with MSP430G2553   
    @@Oldnotdead
     
    The file you posted is not an Energia sketch, it's a "standard" C source file intended to be compiled and linked with CCS or IAR.
     
    Take a look at this instead.
  3. Like
    energia reacted to veryalive in Set PinMode on 2 pins simultaneously   
    Hi,
     
    I've been following your bit-bang I2C efforts.
    If you are making a custom version, perhaps using direct port I/O would be useful?
     
    As follows:
     
    P1DIR |= BIT7 + BIT6;       // make these outputs
    P1OUT |= BIT7 + BIT6;     // make them simultaneously go hi
    P1OUT &= ~(BIT7+BIT6);  //  ditto, but go low
     
    The only thing is that it departs from energia statements.
     
    I suspect you must have a scope / logic analyser or you wouldn't have known / measured the delay between the two PinMode statements you tried? 
     
    Is this OK for your app?
     
    Cheers,
  4. Like
    energia reacted to NurseBob in MSP430F5529 + Energia SERIAL PROBLEM   
    @@fredakos,
    >any ideas?<
    Millions. 
     
    Please post the code, or a relevant code snippet.  There's no way to help with the information you've supplied.
     
    Bob
  5. Like
    energia got a reaction from NurseBob in Using RTC_C alarm and WiFi at the same time   
    [ Cross posting this that what I posted on your e2e post ]
     
    I do have low power Sketches for the CC3200 but low power handling on the CC3200 is very different from what it is on the MSP432. The MSP432 Wiring implementation is based on TI-RTOS. So hence a mix of driverlib/TI-RTOS API's need to be used to get the RTC going. I will follow up with the WiFi code later this week but below is a skeleton Sketch for the RTC:   // Header files #include <driverlib/MSP432P4xx/rtc_c.h> #include <driverlib/MSP432P4xx/interrupt.h> #include <driverlib/MSP432P4xx/wdt_a.h> #include <ti/drivers/power/PowerMSP432.h> #include <ti/sysbios/family/arm/m3/Hwi.h> #include <ti/drivers/Power.h> volatile bool flag = false; void vRtcIsr(UArg arg) {   // Clear the flag, but don't actually do anything   RTC_C_clearInterruptFlag(RTC_C_CLOCK_ALARM_INTERRUPT); } /* Time is November 12th 1955 10:03:00 PM */ const RTC_C_Calendar currentTime = {   0x00,   0x03,   0x22,   0x12,   0x11,   0x1955 }; uint32_t x = 0x04; Hwi_Params params; void setup() {   // Initialize Serial   Serial.begin(115200);   Serial.println("Setting up RTC");   // Set current time   RTC_C_initCalendar(&currentTime, RTC_C_FORMAT_BCD);   // Set an alarm   RTC_C_setCalendarAlarm(x, 0x22, RTC_C_ALARMCONDITION_OFF, RTC_C_ALARMCONDITION_OFF);   // Register interrupt   Hwi_Params_init(&params);   Hwi_create(INT_RTC_C, vRtcIsr, &params, NULL);   // RTC_C_registerInterrupt(vRtcIsr);   Interrupt_enableInterrupt(INT_RTC_C);   // Clear the interrupt   RTC_C_clearInterruptFlag(RTC_C_CLOCK_ALARM_INTERRUPT);   // Enable the interrupt   RTC_C_enableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT);   // Enable the clock   RTC_C_startClock(); } void loop() {   // Small delay to allow for Serial to be flushed.   delay(1000);   // End serial to remove power constraints   Serial.end();   // Stop the watchdog and remove power constraints   stopWatchdog();      /* go to DEEPSLEEP_1 */   Power_sleep(PowerMSP432_DEEPSLEEP_0);   startWatchdog();   // Reinitialize Serial    Serial.begin(115200);   Serial.println("Woken up");      x++;   // Set the alarm for now + 1 min   RTC_C_setCalendarAlarm(x, 0x22, RTC_C_ALARMCONDITION_OFF, RTC_C_ALARMCONDITION_OFF); } void startWatchdog() {   // Clear the watchdog timer   WDT_A_clearTimer();   // Start the watchdog timer   WDT_A_startTimer(); } void stopWatchdog() {   // Hold the watchdog timer    WDT_A_holdTimer();   // Remove power constraints. Do not allow LPM4 since this kills the RTC   Power_setConstraint(PowerMSP432_DISALLOW_DEEPSLEEP_1);   Power_releaseConstraint(PowerMSP432_DISALLOW_DEEPSLEEP_0); }
  6. Like
    energia reacted to Fmilburn in Library DNP3 to MSP430   
    You are referring to an issue around Atmel microcontrollers on a Texas Instruments oriented site so it is very unlikely you will get a satisfactory response to your question.   Anyway, you will not get something written for an ARM processor using direct register access to compile on a 8 bit processor like the Uno.  Nor will it compile on a MSP430.  And it is unlikely that anyone has ported this to Arduino/Energia but the best persons to ask would be the authors of the firmware.
  7. Like
    energia reacted to chicken in Library DNP3 to MSP430   
    Definitely looks like a complex undertaking. But those are the best learning opportunities.
     
    You will have to get an understanding about the overall architecture of OpenDNP. As @@Fmilburn suggested, contacting the owner or main contributors of the Github repository is probably your best bet when stuck on that topic. This includes getting their implementation to build. If the AVR implementation is working, there's a good chance that the FR6989 has sufficient resources.
     
    The "embedded" link includes "adapter" sub-folders, which look like platform specific code for AtmelAVR and AtmelDue (probably referring to the boards, not the whole Arduino programming framework). I think the files in there are a good indication for what needs to be re-implemented for a new platform like MSP430. On a quick glance, the code doesn't look too extensive, which is encouraging.
     
    Also check whether they make use of Atmel libraries in the code that's not platform specific.
  8. Like
    energia reacted to LIJsselstein in [SOLVED] Assembler Error: odd operand: 6229   
    To answer my own question: the error is triggered because, for 16 or 32 bit operations, the variable must be aligned on an even memory address, however the INFOMEM_CORRECTION_VALUE variable was defined on an odd address. Moving it from 0x1855 to 0x1856 solved the compiler error.
  9. Like
    energia reacted to LiviuM in Frequency counting empty serial monitor   
    LE Found it, the pins default to inputs:
  10. Like
    energia got a reaction from speed07 in Serial monitor error   
    There is an issue with MSP432 and baudrates < 115200. Energia 18 and 115200 does work however. It will be fixed in the next MSP432 core release.
  11. Like
    energia reacted to Fmilburn in Serial monitor error   
    There seems to be a problem with 9600 baud and possibly other baud rates on the MSP432 when using Energia.  Try Energia V17 at 115200 baud.
  12. Like
    energia reacted to speed07 in Serial monitor error   
    Thanks a lot, the problem is solved by using baud rate of 115200 with msp432 on energia V17
  13. Like
    energia reacted to Fmilburn in Verify PCB using Energia   
    Hi @@imagiro1,
     
    You can do a search of 43oh for "add new pinmap Energia" , "add new microcontroller Energia", and such and turn up some threads.  But it is probably easier and faster to use CCS and the examples that TI includes for the peripherals on all their microcontrollers.
  14. Like
    energia got a reaction from Rei Vilo in Using RTC_C alarm and WiFi at the same time   
    [ Cross posting this that what I posted on your e2e post ]
     
    I do have low power Sketches for the CC3200 but low power handling on the CC3200 is very different from what it is on the MSP432. The MSP432 Wiring implementation is based on TI-RTOS. So hence a mix of driverlib/TI-RTOS API's need to be used to get the RTC going. I will follow up with the WiFi code later this week but below is a skeleton Sketch for the RTC:   // Header files #include <driverlib/MSP432P4xx/rtc_c.h> #include <driverlib/MSP432P4xx/interrupt.h> #include <driverlib/MSP432P4xx/wdt_a.h> #include <ti/drivers/power/PowerMSP432.h> #include <ti/sysbios/family/arm/m3/Hwi.h> #include <ti/drivers/Power.h> volatile bool flag = false; void vRtcIsr(UArg arg) {   // Clear the flag, but don't actually do anything   RTC_C_clearInterruptFlag(RTC_C_CLOCK_ALARM_INTERRUPT); } /* Time is November 12th 1955 10:03:00 PM */ const RTC_C_Calendar currentTime = {   0x00,   0x03,   0x22,   0x12,   0x11,   0x1955 }; uint32_t x = 0x04; Hwi_Params params; void setup() {   // Initialize Serial   Serial.begin(115200);   Serial.println("Setting up RTC");   // Set current time   RTC_C_initCalendar(&currentTime, RTC_C_FORMAT_BCD);   // Set an alarm   RTC_C_setCalendarAlarm(x, 0x22, RTC_C_ALARMCONDITION_OFF, RTC_C_ALARMCONDITION_OFF);   // Register interrupt   Hwi_Params_init(&params);   Hwi_create(INT_RTC_C, vRtcIsr, &params, NULL);   // RTC_C_registerInterrupt(vRtcIsr);   Interrupt_enableInterrupt(INT_RTC_C);   // Clear the interrupt   RTC_C_clearInterruptFlag(RTC_C_CLOCK_ALARM_INTERRUPT);   // Enable the interrupt   RTC_C_enableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT);   // Enable the clock   RTC_C_startClock(); } void loop() {   // Small delay to allow for Serial to be flushed.   delay(1000);   // End serial to remove power constraints   Serial.end();   // Stop the watchdog and remove power constraints   stopWatchdog();      /* go to DEEPSLEEP_1 */   Power_sleep(PowerMSP432_DEEPSLEEP_0);   startWatchdog();   // Reinitialize Serial    Serial.begin(115200);   Serial.println("Woken up");      x++;   // Set the alarm for now + 1 min   RTC_C_setCalendarAlarm(x, 0x22, RTC_C_ALARMCONDITION_OFF, RTC_C_ALARMCONDITION_OFF); } void startWatchdog() {   // Clear the watchdog timer   WDT_A_clearTimer();   // Start the watchdog timer   WDT_A_startTimer(); } void stopWatchdog() {   // Hold the watchdog timer    WDT_A_holdTimer();   // Remove power constraints. Do not allow LPM4 since this kills the RTC   Power_setConstraint(PowerMSP432_DISALLOW_DEEPSLEEP_1);   Power_releaseConstraint(PowerMSP432_DISALLOW_DEEPSLEEP_0); }
  15. Like
    energia got a reaction from Davidwallis in Energia can example   
    Attached are 2 Sketches that might help you. 
    dph_CANExamplePolled.ino
    dph_CANExampleWithInterrupts.ino
  16. Like
    energia got a reaction from Fmilburn in Energia can example   
    Attached are 2 Sketches that might help you. 
    dph_CANExamplePolled.ino
    dph_CANExampleWithInterrupts.ino
  17. Like
    energia reacted to yyrkoon in sprintf weirdness on cc3200   
    Hello . . .
     
    So first thing off. Your buffer is too large. This isn't Windows, or even Linux. This is an embedded device where memory is at a premium. Now, perhaps 500 chars( or bytes ) may not be too much, but still far from necessary. reduce its size to ~100.
     
    Second off, you should zero out your buffer before you use it. Use memset() or at initialization assign the value of {0} like so:
    char buffer[100] = {0}; Thirdly, don't use sprintf(), use snprintf() if available. It's much safer. However if you're dead set on using sprintf(). Check the return value. You're not checking the return value in your code, so for all intents, and purposes. Your code will fail silently.
     
    Lastly, float types can sometimes behave very oddly if you're not careful how they're initialized, or used. Sometimes even just adding an 'f' at the end of a value can help. Post-fixing the type, but that's not strictly speaking, necessary.
  18. Like
    energia got a reaction from pneumatics in Energia-1.6.10R18 Windows 7 LaunchPad MSP430G2553 don't load sketch   
    Thanks for reporting this issue. I was able to reproduce it. For now you can work around it as described below. I will make a fix available in the next MSP430 package update through the board manager.
     
    copy <energia directory>\hardware\tools\DSLite\DebugServer\drivers\MSP430.dll to <energia directory>\hardware\tools\msp430\bin\ edit <energia directory>\hardware\energia\msp430\boards.txt an change the 2 occurrences of rf2500 with tilib restart energia and you should be able to upload to the MSP-EXP430G2 with MSP430G2553. I have also filed an issue on github here: https://github.com/energia/msp430-lg-core/issues/12
  19. Like
    energia reacted to Rei Vilo in Task_construct not allowed by Energia?   
    Have you had a look at the Galaxia library?
     
    See http://embeddedcomputing.weebly.com/task-library.html
  20. Like
    energia got a reaction from curtis63 in Energia-1.6.10R18 Windows 7 LaunchPad MSP430G2553 don't load sketch   
    Thanks for reporting this issue. I was able to reproduce it. For now you can work around it as described below. I will make a fix available in the next MSP430 package update through the board manager.
     
    copy <energia directory>\hardware\tools\DSLite\DebugServer\drivers\MSP430.dll to <energia directory>\hardware\tools\msp430\bin\ edit <energia directory>\hardware\energia\msp430\boards.txt an change the 2 occurrences of rf2500 with tilib restart energia and you should be able to upload to the MSP-EXP430G2 with MSP430G2553. I have also filed an issue on github here: https://github.com/energia/msp430-lg-core/issues/12
  21. Like
    energia reacted to Fmilburn in GPS + GSM on MSP430 using Energia   
    @@anwar1506
     
    You may be going about this backwards - start with the application requirements and then pick the microcontroller based on the requirements
     
    I am an electronic hobbyist so perhaps one of the more learned members will jump in if I get part of this wrong.  There are only two UARTs on the FR5969.  Pins 2.1 and 2.0 connect to the Ez-FET which is a USB to UART bridge that allows both programming of the target microcontroller (in this case the FR5969) and serial communication (in the case of Energia through a window that you open up).
     
    If you want to use Pins 2.1 and 2.0 for something other than programming and serial communication then 1) download the firmware as usual over USB using the Ez-FET, 2) remove the USB connection, 3) remove the RXD and TXD jumpers and isolate Ez-FET from the target microcontoller, 4) connect the new device (e.g. GPS) to RXD and TXD on the target side - i.e. FR5969 side, and 5) power back up.  Now the new device can use hardware UART over pins 2.1 and 2.0.
     
    Of course you can't use serial over USB to the PC now since the jumpers were removed.  If PC connection is required then you can use software UART (limited to 9600 baud) or select a microcontroller such as the TM4C123 which has plenty of UART peripherals available. 
  22. Like
    energia reacted to Fmilburn in GPS + GSM on MSP430 using Energia   
    I've looked at the User's guide and although the board has 2 UART interfaces, one of them is called 'Application (or "Backchannel") UART'. If I am unable to use both UARTs on board to communicate, how is it that the combined GPS + GSM module can interface with the micro-controller using just the 1 interface? I am not that familiar with that device but the Energia pin diagram you link to shows  the following:
     
    Pins 3 and 4 on the left hand LaunchPad header are labelled P2.6 and P2.5 as well as RX(1) and TX(1) The programming header is labelled RXD and TXD.  Looking at the LaunchPad User's Manual these turn out to be P2.1 and 2.0. There are two UARTS available in hardware:  USCI_A0 and USCI_A1.
     
    I haven't tried this on the FR5969 but quoting from the Energia documentation on Serial:
  23. Like
    energia reacted to Fmilburn in GPS + GSM on MSP430 using Energia   
    HI @@anwar1506 and welcome to 43oh...
     
    I have used the NEO-6M GPS with the MSP430F5529 using the library that is linked on this page:  https://www.addicore.com/NEO-6M-GPS-p/231.htm
     
    If I remember correctly, no modification to the library was necessary.  It would have been with Energia V16 or maybe V17.  Here are the pins, taken from comments I inserted into the code at the time:
    MSP-EXP430F5529 LaunchPad connected to an Addicore NEO-6M GPS Module at 9600 baud. Connections are as follows: NEO-6M LaunchPad Comments ------ --------- ------------------------------------------- VCC 3V3 NEO-6M is a 3.3 V device RX Pin 4 Pin 4 on LaunchPad is TX TX Pin 3 Pin 3 on LaunchPad is RX GND GND
  24. Like
    energia reacted to chicken in SPI between MSP430/432 and MCP3911   
    Grounds are often connected accidentally, e.g. when both devices are powered from the same USB hub. But to avoid any problems, it's better to explicitly make the connection.
     
    Looking at your picture, I wonder if there's another MCU in that device that is connected to the MCP3911. If so, it will fight the MSP430 for control over SPI and lead to unexpected results.
  25. Like
    energia reacted to chicken in SPI between MSP430/432 and MCP3911   
    You will need to connect with DGND / GNDB.
     
    GND is the reference point to decide whether a signal is high or low. In electronics, connected GND is almost always required/assumed with only a few exceptions.
     
    Did you also check SS with the oscilloscope?
     
    Typically, SPI does not require pull-ups/downs. Unless explicitly mentioned in the datasheet of the MCP3911 or related evaluation boards, you probably don't need them.
×
×
  • Create New...