Jump to content

jcR

Members
  • Content Count

    53
  • Joined

  • Last visited

  • Days Won

    5

Reputation Activity

  1. Thanks
    jcR got a reaction from Derekspeegle in Serial1 not Working, attachInterrupt not Working   
    I still do not understand why corrections have still not been made for this chip.
    As I needed these corrections, I had to do them myself although I am not a specialist on this subject.
    So I modified the necessary files to have access to all the pins of the MSP430FR5994,
    even those which are not cabled on the Launchpad, in order to be able to use them on my own cards.
    I enclose the modified files as well as the positions in the folders, to help the users facing the same problems as me.
    It would be desirable for the Energia team to finally address these issues and include these changes in a forthcoming release.
    Indeed this chip is perfect to make very good low consumption modules ,
    and the  ENERGIA concept  makes it easy to develop the complementary software
     
    CORRECTED_BUGS.zip
  2. Thanks
    jcR got a reaction from TL228 in [Energia Library] Jaffl: Just another FatFs library   
    Hi Geometrikal, Hi TL
    The portage works perfectly, it is only necessary to put the good chip select for the Launchpad as well as to specify the good bus SPI in the file Jaffl.cpp in the routine SPI_INIT. For the applications which I use I tested at the same time the competition between the SPI bus (0) which manages the SD card and the SPI bus (1) which manages another device.
    I enclose all the necessary sources to test on a Launchpad MSP430FR5994.
    For my work I use Visual Studio 2019 with the Visual Micro plugin.
    I can compile for Arduino (Arduino,ESP8266,ESP32,ST) and Energia families in an efficient way.
    Jaffs_MSP5994.zip
  3. Thanks
    jcR got a reaction from TL228 in Serial1 not Working, attachInterrupt not Working   
    I still do not understand why corrections have still not been made for this chip.
    As I needed these corrections, I had to do them myself although I am not a specialist on this subject.
    So I modified the necessary files to have access to all the pins of the MSP430FR5994,
    even those which are not cabled on the Launchpad, in order to be able to use them on my own cards.
    I enclose the modified files as well as the positions in the folders, to help the users facing the same problems as me.
    It would be desirable for the Energia team to finally address these issues and include these changes in a forthcoming release.
    Indeed this chip is perfect to make very good low consumption modules ,
    and the  ENERGIA concept  makes it easy to develop the complementary software
     
    CORRECTED_BUGS.zip
  4. Like
    jcR got a reaction from Jamesgrr in Using FRAM above 0x00010000   
    "support has been added in Energia for the MSP430FR5994"   but Serial1 is not working, and  and even more unfortunate, the available I / O still does not support interrupt handling.
    I mentioned these problems since May 2018, Energia1.8.7E20 is available and the same problems are still unresolved.
    It is difficult to try to work with a chip that is very poorly supported by the ENERGIA teams.
    Sorry for this reminder, but please try to do something!
    I develloped a  simple Lora gateway (Wifi+GSM/GPRS) from this launchpad and the results are good despite these difficulties of programming!!
  5. Like
    jcR got a reaction from LoRaWAN in Using SPI and LoRa Libraries in Energia for MSP430G2553   
    you can not use Lora library with the MSP430G2553.
    Ram is to small !!!!! only 512 bytes 
    Arduino 2Kbytes SRAM
  6. Like
    jcR reacted to geometrikal in [Energia Library] Jaffl: Just another FatFs library   
    I have been searching for a FatFs Energia library for the FR5969 a while and haven't come across anything that worked, so I decided to try make one. If there is one out there.... ahhhhhhhhhhghhghgh.
     
    The library is called Jaffl: Just another FatFs library     
     
    It is located at:  https://github.com/geometrikal/Jaffl
     
    Details:
    It is written for the MSP430FR5969, mainly because transmit and receive SPI bytes routines hard coded to USCB0. If someone can make this more generic it would be welcome. The Jaffl wrapper is based on the FatFs wrapper by David Sirkin. The latest FatFs version (ff11) is used, but not all functions may have made it to the wrapper. The diskio.c MMC interface comes from the TI example code for the MSP430F5529 LaunchPad with a few changes: 1. there were extra functions added to attach the SPI init / change speed / cs routines. 2. Class 6 and 10 cards weren't initialising, so instead of sending CMD0 once before failing (during disk_initialization()) it keeps sending every 1ms until it gets the right response, or one second has passed. f_printf was changed to f_vprintf in ff.c and modified to accept va_list instead of the normal variable argument designator (the dots: ...) . This is because Jaffl.printf wraps it, and needs to pass the variable arguments as va_list. A quick test example:
    #include "SPI.h" #include "Jaffl.h" int counter = 0; void setup() {   Serial.begin(57600);   Serial.println("Startup");   Serial.print("Begin, return code: ");   Serial.println(Jaffl.begin(P3_0));       Serial.print("Open file, return code: ");   Serial.println(Jaffl.open("test.txt", FA_WRITE | FA_CREATE_ALWAYS)); } void loop() {   Serial.print("Print file, return code: ");   Serial.println(Jaffl.printf("Hello world: %d\r\n", counter++));   Serial.print("Sync, return code: ");   Serial.println(Jaffl.sync());   delay(1000); } The code isn't polished, but seems to work. I will be doing on going testing as this will be used in another project, but I've put it up now to get feedback and help spot bugs. 99% of the code came from other sources so thanks to those people. Its all on github so if you have changes do a pull request.
     
    2015-03-18 - Added MISO internal pull up to get some cards to work.
  7. Like
    jcR got a reaction from chicken in Energia 0101E0013 - fram optimization and new SPI library not compatible with cc3000 launchpad   
    I return to the problem of the SPI library. 
    I finally connected a logic analyzer on the SPI signals with an TIVA Launchpad (Stellaris 80 MHz) coupled to CC3000 Wifi module. 
     
    Here are the notes: 
    -1 I found that the new library has changed the SPI clock frequency to a value of 4 MHz for  compatibility  with Arduino. 
    Unfortunately this value blocks the initialization for the CC3000 boosterpack . 
     
    It is not logical for a SPI bus but the module work correctly  with a clock speed of 6 MHz up to 16 MHz value. 
     
    -2 I also noticed that the VBAT-SW-IN signal was controlled by the SPI signal SSInFss which is illogical. 
    Indeed it goes in low state for each clock train (8 cycles), which has normally the effect of stopping the normal operation of the module (according to Texas). See Image DSC00261. But in this case it's work perfectly!!!!!!!
    I finally forced up signal all the time (with no change but it's logical for me to have this signal High). 
     
    -3 The SPI signal SSInTX goes in high impedance  during off  cycle, which means that the corresponding input of CC3000 is floating when the chip select is already low .This is not necessarily good at electronics level. 
     
    Initializing the SPI clock frequency with an low value ( in Energia E0013) prevents a user to  change the frequency up through   the function setClockDivider !!!
     
    The new version with the removed  SimpleLink CC3000 library for BoosterPack no longer allows use. 
    The new library WIFI only works with CC3100 module and CC3200.
     
    I am interested in other opinions and remarks.

  8. Like
    jcR reacted to L.R.A in TM4C129 Hibernation RTC and Calendar Mode   
    This code only works with TM4C1294XL launchpad, don't try it in the older TM4C123 
     
     
    Hi guys so i bring you more a basic example code about peripherals. this one i also had some trouble fiding info on how to use it but notigh beats checking out the source files
    If you think i should keep geting this simple but handy (i think they are) examples, tell me since i alredy have to make them for some people i know
    Hope it helps someone:
    /* Code made with energia-0101E0012 This code is suposed to help clarify anyone with doubts of how to use very basic fuctions of the RTC in the hibernation peripheral and also the hardware calendar mode. Any sugestions and improvements are always welcome This example only changes and show hour, minutes and seconds but there's: psTime->tm_min psTime->tm_sec psTime->tm_mon psTime->tm_mday psTime->tm_wday psTime->tm_year psTime->tm_hour */ #include "driverlib/hibernate.c" void HibernateHandler(void) { //Use this to reset interrupt flag uint32_t ui32Status = HibernateIntStatus(1); HibernateIntClear(ui32Status); //Place here code to execute every second, ex: LCD or 7 segment display //Altough it should be as fastest as possible //To keep the interrupt hapening every second you need this HibernateRTCMatchSet(0,HibernateRTCGet()+1); } /*It's need a struct pointer of the type "tm" so i use new to do that. This type of struct is defined in the driverlib/hibernation you could also create it like this: tm temp; and then use &temp and temp.values in the fuctions */ tm *temp = new tm; void setup() { Serial.begin(9600); // put your setup code here, to run once: //Enable Hibernate peripheral. I'm using Energia so i use F_CPU for geting the clock frequency HibernateEnableExpClk(F_CPU); HibernateRTCEnable(); //We set a interrupt for the RTC after second. You can change the value HibernateRTCMatchSet(0,HibernateRTCGet()+1); HibernateIntRegister(HibernateHandler); HibernateIntEnable(HIBERNATE_INT_RTC_MATCH_0); //Set up calender mode. HibernateCounterMode() is always needed but can be set to 12hr mode HibernateCounterMode(HIBERNATE_COUNTER_24HR); HibernateCalendarSet(temp); //<-- the struct declared //We change the hour, minutes and seconds temp->tm_hour= 23; temp->tm_min=59; temp->tm_sec = 50; //This fuction below is what actualy updates the values inside the peripheral. //if you don't use it, the value changes above won't do anytigh HibernateCalendarSet(temp); } void loop() { //This is to take the "live" values that the RTC keeps updating into our struct HibernateCalendarGet(temp); Serial.print(temp->tm_hour); Serial.print(':'); Serial.print(temp->tm_min); Serial.print(':'); Serial.println(temp->tm_sec); delay(1000); }
  9. Like
    jcR reacted to Bernard in attachInterrupt on Stellaris Launchpad   
    Hello JCR,
     
    Contrary to arduino documentation on Stellaris you can use all  GPIO pins as first argument of the "attachinterrupt function"
     
    ex:
    attachInterrupt (PB_3, isrFunction, mode); Here is an example using PUSH1  on PF_4 that toggle RED_LED
     
    /* Test interruption et antirebond */ unsigned long DebounceTime; unsigned long LastDebounceTime = 0; volatile int FlagStateRedLed = LOW; volatile int FlagStateGreenLed = LOW; void setup() { Serial.begin(9600); pinMode(RED_LED, OUTPUT); pinMode(PUSH1, INPUT_PULLUP); attachInterrupt(PUSH1, ChangeStateRedLed, FALLING); } void loop() { for (int i = 0; i < 100; i++) { Serial.println(" Waiting for push1 pressed"); delay(10); } } void ChangeStateRedLed() { DebounceTime = millis(); if ( DebounceTime - LastDebounceTime > 200 || DebounceTime < LastDebounceTime) { FlagStateRedLed = !FlagStateRedLed; digitalWrite(RED_LED, FlagStateRedLed); LastDebounceTime = DebounceTime; } } Hope this help
     
    Cheers
     
    Bernard
  10. Like
    jcR got a reaction from bluehash in Uarts on Stellaris Launchpad   
    Hello to all
    I worked hard on serials communications for Stellaris Launchpad with Energia.
    I can now provide all the files (MODIFS.zip) for the correct operation of the card with the ports 0,1,2,3,5,6,7.
    And a test file with the corresponding wiring on the Launchpad.
    Unfortunately there is a major problem with the operation of ports in serial reception:
    You can not send a frame on a serial port in reception if you do not treat the reception of these frames. This causes software crash for the cards .
    Otherwise if the frames are received in time all UARTs work perfectly.

    Remark: it's not necessary to remove resistor R15 to work with Serial2
    idem for Serial6 (USB) . you can work without modifs!
    JCR
     
    I have updated the files with corrected HardwareSerial.h 
    MODIFSupdated.zip
×
×
  • Create New...