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

Rickta59

Global Moderators
  • Content Count

    1,121
  • Joined

  • Last visited

  • Days Won

    70

Everything posted by Rickta59

  1. Rickta59

    Add MSP432 support to Arduino?

    not json but instructions given for linux https://github.com/RickKimball/tivac-core Assumes you have openocd and arm-none-eabi-gcc in your path. Probably won't work for windows. Probably will work for OSX.
  2. Those APA-102 leds that are packaged like ws281x pixels but you drive like a ws2801 (clk/data) have hit ebay.com. I ordered a 1 meter length and it arrived today. They look and feel like a ws2811 strip. It has 4 connections. 5V, GND, CLK, DATA. I whipped up a quick test and they seem to be happy: /** * APA-102 - test of 5 leds * * Author: rick@kimballsoftware.com * Date: 09-11-2014 * */ #include <fabooh.h> #include <main.h> #include <spi.h> namespace { typedef spi_attr_t<> SPI_MODE3_A; typedef spi_eusci_b0_t<CS, SCLK, MOSI, NO_PIN, SPI_MODE3_A > spi_t; spi_t spi; } void setup(void) { spi.begin(); spi.set_divisor(8); // 1MHz spi } static const unsigned char buff0[] = { 0x00, 0x00, 0x00, 0x00, // start frame (0b111 << 5 | 31), 0x00, 0x00, 0xFF, // red (0b111 << 5 | 31), 0x00, 0xFF, 0x00, // green (0b111 << 5 | 31), 0xFF, 0x00, 0x00, // blue (0b111 << 5 | 31), 0xFF, 0xFF, 0xFE, // white (0b111 << 5 | 31), 0x00, 0x00, 0x00, // off 0xFF, 0xFF, 0xFF, 0xFF // end frame }; static const unsigned char buff1[] = { 0x00, 0x00, 0x00, 0x00, // start frame (0b111 << 5 | 31), 0x00, 0x00, 0x00, (0b111 << 5 | 31), 0x00, 0x00, 0x00, (0b111 << 5 | 31), 0x00, 0x00, 0x00, (0b111 << 5 | 31), 0x00, 0x00, 0x00, (0b111 << 5 | 31), 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF // end frame }; void loop(void) { while(1) { spi.select(); spi.shiftout(buff0, sizeof(buff0)); spi.deselect(); delay(1000); spi.select(); spi.shiftout(buff1, sizeof(buff1)); spi.deselect(); delay(1000); } } These chips are perfect when you don't want to run your msp430 at high clock speed but still want to be able to use a bunch of rgb leds without resorting to external led drivers or shift registers. However, if you do want to run fast, even faster than the ws281x 800kHz, you can. I tested with both a low speed (500Hz) and a high speed (up to 16MHz) configuration successfully. Using an msp430fr5969 chip at 8MHz I settled on 1MHz in the code above. For a nice review of the chip's internals, you can read more about them on this cpldcpu's blog: http://cpldcpu.wordpress.com/2014/08/27/apa102/ -rick
  3. Rickta59

    Store values inside µc

    The msp430g2231 only has a total of 2048 bytes of flash. If you use Energia, you are going to suck up half that flash just getting it to compile an empty sketch. The EEPROM on an atmega328p has 1024 bytes of eeprom. What do you want to store in EEPROM?
  4. Rickta59

    The problem about compiling "Blink" by Energia

    this was fixed a long time ago. https://github.com/robertinant/EnergiaNG/issues/10 are you sure you have the latest stuff?
  5. googling seems to indicate this is a known problem.
  6. Rickta59

    CoRTOS: An open source minimalist RTOS

    It is deleted
  7. Rickta59

    CoRTOS: An open source minimalist RTOS

    Do you want people to help you with this? It seems like you are expecting people to fill in the gaps. Should I just delete the repo?
  8. Rickta59

    CoRTOS: An open source minimalist RTOS

    I uploaded the zip file that is available from sourceforge. You pointed me at that. If I'm going to upload something to source control, I'm going to base it on a source code control system instead of a forum post that is likely to disappear. No I don't think it is presumptous. I really don't claim to have written it. The readme doesn't say anything about me being the author. The README.md indicates it is a mirror of your original. It also has all your contact information not mine. I would much prefer that you have a repository that I could fork and provide changes via a pull requests instead of dealing with zip files. Zip files are not a source code control system.
  9. Rickta59

    CoRTOS: An open source minimalist RTOS

    I created a mirror of your source code on github. I extracted all the files so people can look at it without downloading a zip file. I also created a msp430 branch that shows the changes I needed to make to get simple blinky and super blinky to compiler for the msp430. https://github.com/RickKimball/CoRTOS/tree/msp430 -rick
  10. Rickta59

    CoRTOS: An open source minimalist RTOS

    Thanks I hadn't found that in my searches. Do you plan on doing any msp430 specific features?
  11. Rickta59

    CoRTOS: An open source minimalist RTOS

    Sure I understand that. I'm just passing along my biased observations What I've seen with the msp430 and RTOS support in general is this. People/groups make a simplistic stab at supporting the msp430 and then just as quickly abandon the effort. It is hard to compete with the fully featured TI-RTOS/SYS-BIOS code. TI-RTOS is free with a BSD license. TI actually supports it on their e2e.ti.com forum. However, it is a beast. TI-RTOS tames you, you don't tame it. I've heard it is slow and bloated on the msp430. It uses an arcane set of TI custom command line based tools that force you to conform. I don't want to be tamed. In my opinion, TI is good with hardware and software is an afterthought that some marketing guy needs to be able to check boxes on a specification sheet. I think there is a niche for a small and simple RTOS, not unlike what you have posted, that actually fully takes advantage of the lower power features of the msp430 chips. However, it would be easier to pass on fixes and identify real software issues if you put the source code on some public repository. That is assuming your goal is to get a group of people actively using the code. It might eliminate the muttering of 100 people making the same fix in some snapshot in time of a zip file you randomly post on various web forums. Other users here have posted some simple tasking code. However, there is always some catch or no followup. This guy posted some promising code. Sadly it was writtten to work only with the $1500 IAR compiler and after he posted it there wasn't any follow up. FreeRTOS supposedly works on the msp430 chips. So don't think I'm discouraging your efforts. I applaud it. Seems like a good first start. If you want feedback, I'll provide it.
  12. Rickta59

    Serial Port Problem

    I'm not actually not a moderator any more .. not sure why it is still attached to my userid. @bluehash ?
  13. Rickta59

    Serial Port Problem

    I'm not sure why you are posting on a thread about the msp430g2553. You should start another thread and title it "Serial Problem with CC3200"
  14. Rickta59

    Serial Port Problem

    I have no clue. I don't see any msp430g2553 in there.
  15. Rickta59

    Supported MSP430's

    Looks great. I did one https://oshpark.com/profiles/Rickta59 that didn't have any of the required passives. Mine was lame compared to yours. Also it is the only PCB I've ever designed. I decided I'd leave it to others to do properly. Is your PCB design something you would be willing to share?
  16. Rickta59

    Serial Port Problem

    With the G2 launchpad, the best thing to do is remove the TX/RX jumper pins and use an external dongle. USB dongles used to be expensive however you can get them now for less than $2. Pick one that uses 3v3 signals or you will fry your launchpad chip. Something like this will solve all your problems ($1.69 free shipping * at least in the US): https://www.ebay.com/itm/272758761169 Just connect GND/TX/RX to your launchpad leave the 5v power unconnected (maybe even tape it back to the wire so you don't forget) As an added bonus, you will no longer be limited to 9600 baud. I've run these pl2303 chips with an msp430g2553 at 230k without a problem. These show up as /dev/ttyUSBx on linux. -rick
  17. Rickta59

    CoRTOS: An open source minimalist RTOS

    Some general first impressions about CoRTOS: I can spell yield() but I have to ask merriam-webster how to spell relinquish() <msp430.h> would allow people to use whichever MCU they select in CCS without having to edit the source files #include <stdint.h> is a better way to grab uint8_t and friends #include <stdbool.h> is a better way to grab true, false and bool GPL isn't the best license for RTOS code. Even the TI-RTOS (SYS/BIOS) is BSD. FreeRTOS is MIT. nuttx is BSD. RIOT is LPGL. mbed-rtos is MIT. it would be nice if the code would compile with both msp430-elf-gcc and the TI cl430 compiler. inline asm is easier with msp430-elf-gcc and would match your other platforms Although I haven't tried, it doesn't seem like this code would work properly with large model code (where registers are 20 bits instead of 16 bits) look at switching to uintptr_t and intptr_t . uintptr_t is either int16 or _int20 depending on the compiler mode selected. (this would help with 32bit stuff too uintptr_t is uint32_t there) MSP430s have extensive low power features. It isn't just one sleep mode. These modes rely on the SR being properly saved and restored, not sure how this fits into the tasking code. Look into using LPM1, LPM3, etc... using uint8_t results in slower code on an msp430 when you are really just trying to use a natural integer. A locally declared uint8_t is still going to use 2 bytes on the stack. UpperAndLowerCaseIsTediousToReadAndTediousToTypeAndRememberWhenToSwitchCase -rick
  18. Rickta59

    CoRTOS: An open source minimalist RTOS

    Still an issue with upper / lower case naming conflicts: diff -r ./fixed/CoRTOSmessage.c ../../Downloads/cortos_d1/CoRTOSmessage.c 18c18 < #include "CoRTOSuP.h" --- > #include "CoRTOSup.h" the file is named 'CoRTOSuP.h' the code uses 'CoRTOSup.h'
  19. Rickta59

    CoRTOS: An open source minimalist RTOS

    You seem to misunderstand Energia. It is based on the Arduino IDE source code (java based), with customized c++ cores that work with a variety of different TI processors. The msp430, arm cortex, and C2xxxx are all represented. There is no interpreted mcu code, it is C/C++ source that implements the Arduino API. It gets compiled using a cross compiler appropriate for the architecture selected (msp430-gcc, arm-none-eabi-gcc etc) and runs on Windows, Mac, and linux. The TI RTOS (previously called SYSBIOS) has been available for a long time and is fully documented. http://www.ti.com/tool/TI-RTOS Energia implements the TI RTOS in a novel way. You create tasks by creating a new tab in the Energia IDE that contain a setup() and loop() for each task. It automatically uses those tabs to start the tasks. However, that is just skimming the surface. See more info here http://energia.nu/guide/multitasking/ Granted the multitasking implementation hasn't been done for the msp430 chip, however it would be possible. -rick
  20. Rickta59

    CoRTOS: An open source minimalist RTOS

    Interesting chunk of code, however it doesn't seem like you've invested much effort in your msp430 port or cross platform compatibility. The code only seems to attempt only one msp430 mcu (msp430fr6989). As there is no project file for CCS or a makefile, I created an empty CCS project using the TI C compiler for an msp430fr6989. I imported the CoRTOSblinkyMSP.c source and all the headers. It has a bunch of obvious errors. Have you tried to compile that file? It doesn't compile, at least with CCS 7 on ubuntu. Hint 1: you can't use msp430-elf-gcc Hint 2: Edit CoRTOSuP.h and make the processor uP_MSP430 the default Hint 3: Don't try this on a files system that is case sensitive. The source code and files provided uses a mix of upper and lower case. You need to fix the incorrect file name references or rename the files to match the names. First batch of errors: Description Resource Path Location Type #150 variable "task_stack_size" has already been initialized CoRTOStask.c /cortos line 33 C/C++ Problem .. defined multiple times in the source #1965 cannot open source file "msp430FR6989.h" CoRTOSkernel.c /cortos line 18 C/C++ Problem needs to be msp430fr6989.h" .. probably should be just <msp430.h> #20 identifier "t" is undefined CoRTOSblinkyMSP.c /cortos/apps line 202 C/C++ Problem I don't see this declared anywhere, I'm assuming you meant "n" not "t" #20 identifier "tn" is undefined CoRTOSblinkyMSP.c /cortos/apps line 208 C/C++ Problem not sure what you meant to pass to resume_task() .. guessing it is also "n" ? After I addressed those problems, I changed the code around so I could run it on an msp430fr5969 launchpad. The release build results in a multi-tasking blinky app that uses about 1k of code and 200 bytes of ram. That seems to work, maybe I'll try a little more tomorrow. -rick
  21. Rickta59

    CoRTOS: An open source minimalist RTOS

    What does this offer over the RTOS in energia?
  22. Did you try pulling the jumpers for the UART on your launchpad? On linux, the msp430g2553 is notorious for causing hangs because of the Virtual COM port of the MSP-EXP430G2. I can get around the problem by removing the UART jumpers and using an external 3V3 USB serial dongle.
  23. Rickta59

    An extra USB for MSP430

    If the usb is really a keyboard interface you could get one of those usb to ps/2 dongles.
  24. Rickta59

    Anyone interested in grouping PCB fab orders?

    This is a 5 year old thread. PCB prices have dropped significantly in that time and you can get free DHL from some of the China companies. @NicloePatt are you a bot placed here to promote your PCB board company? I haven't seen you ask or respond to any question here in all your posts.
  25. Rickta59

    Porting Arduino Library

    Energia does some static analysis of the flash and ram size. The Energia/Arduino feature only warns you when you use > 70% of resources. If you actually use too much flash or static ram the linker will spew an error. However, this won't give you any indication at runtime that you have run out of ram.
×