This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR6989: pins_energia file

Part Number: MSP430FR6989
Other Parts Discussed in Thread: ENERGIA

Hi there,

I've seen that the pins_energia file for MSP430FR6989 is designed for launchpad itself. So i,m developing a custom board using MSP430FR6989 will that same pin out file with the launchpad pin numbers can be used, or is there any pins_energia file only for that IC with all the pin numbers for each pin, or should i modify it accordingly?, if needed to modify then what changes can i do to make it compatible please help.

Thank you

  • Hi,

    if you are using windows you will find the latest package here:

    c:\Users\YOURNAME\AppData\Local\Energia15\packages\energia\hardware\msp430\1.0.5

    In your case i recommend to setup a new board. For that you need to add it to
    boards.txt
    just copy the section of the MSP-EXP430FR6989LP
    and replace there all MSP-EXP430FR6989LP with a name for your board
    Then go into the variants folder and copy the MSP-EXP430FR6989LP folder to a folder with your new board name folder
    Finally update the pins_energia.h in this folder to make to your board.
    and again rename the file MSP-EXP430FR6989LP.ccxml

    ~ Stefan
  • Thank you for your reply Stefan,
    I'm sorry to say that i fully didn't understand what you said above.
    Can you please elaborate ?
  • Hi,

    i am not sure what exactly you would like to get.

    If you make a custom board with the same pin mapping as the launch pad you can use the original Energia setup.

    If you need to make a customer board with a different mapping between the device pins and the pins on the board you need to modify this mapping file which is the pins_energia.h file for this board or better make a setup for a new board.

    So first what is the real target and which part of the first mail was not clear?

    Regards,

     Stefan

  • Hi,
    Thank you for your fast reply Stefan.
    I clearly understand now
    You see my project is to check the status of 44 pins gpio if high or low and to connect a 128x64 lcd which uses 5 pins in spi config and a gsm module which uses the UART and some LED indications.
    So the pins file in energia is designed for the launch pad with just 45-50 pins numbers assigned?.
    So for my requirement in that case is i have to add some additional pin numbers in pins_energia and the rest as told by you in the first reply.
    so for example now i need to add a pin P5.1 which is the 20th pin in the IC, which is not avaliable in the pins file ,
    static const uint8_t P2_3 = 31; (default pin assignment from pins_energia )
    static const uint8_t P5_1 = 51; (ill be adding this in the same file like this) so doing this like adding the pins i want like this will workout or is there something else.
    That's what my doubt is.
  • pins_energia.hHi,

    as the pins are handled in arrays you should keep a sequential order, this mean then next free index in the tables is 47.

    So this would be

    static const uint8_t P5_1 = 47;

    Then you also need to update the pin function tables below.

    I have attached a file where i added the P5.1. If you diff that with the original file you will see the changes so you can apply the additional updates as well

    Regards,

    Stefan

  • Thank you so so much Stefan.
    Now i'm very much clear about it. Will let you know when i'm done and i shall ask if i get stuck again. Please don't hesitate cause i'm still learning

    Thank you sir.
  • 8662.pins_energia.hHello Stefan,
    I have one doubt.
    how to identify that the pin is SEL1 like T0B4_SEL1, /* 35 - P2.2 */

    And one more i see that some pins have repeated T1A0 and T1A1 like for in pins on ic 18 p10.2 and 21 p5.2  are same and 19 and 16 also have same T1A1.

    SO is that fine?

    I finished writing the file ive added 38 pins and tested all the pins GPIO functionality by connecting an led and blinking it , it works fine.

    Ive attached the file please check it and let me know if any errors, and please clarify me of the above queries.

    Thank you

  • Hi,

    when checking the datasheet sections for the Pin functions you find a table like this:

    The mapping for the SEL can be found here. Historically we only had one SEL. So for the first Module function with

    PxSEL1 = 0 and PxSEL0 = 1  there is no SEL appendix to the name in this case T0A1 (note the first number and the A are swapped).

    For the others are

    PxSEL1 = 1 and PxSEL0 = 0 : T0A1_SEL1   (not valid for this port - just as an example)

    PxSEL1 = 1 and PxSEL0 = 1 : T0A1_SEL2   (not valid for this port - just as an example)

    Yes, it is OK to use the PWM pins on multiple IOs but you should not use the PWMs with index 0 (2nd index used for CCR e.g. T0A0, T1A0, ...) as this are used for the period of the PWM. So put a NOT_ON_TIMER there.

    There will be an update in the next energia which replaces

    #define PLACE_IN_FRAM __attribute__((section(".text")))
    with

    #define PLACE_IN_FRAM __attribute__((section(".text#")))
    So you can updates this also.

    Otherwise looks good - great work

    Regards,

     Stefan

  • Thank you Stefan,

    And is it possible to add support for TMS570LS04 Hercules launch pad on energia ide?
  • Hi,

    possible: quite sure

    but i do not know that someone in the Energia community is already working on that.

    Regards,

     Stefan

  • Cool.
    Thanks Stefan

    Any ideas on how to add a new board??

  • Hi,
    sorry - missed the question.

    What do you mean with add a new board?
    I put already some instructions into my first reply - do you need more details or other information?

    Regards,
    Stefan
  • Need details on how to add a new board, Cores for hercules.
  • Great but be aware that this is quite amount of work.

    A good starting point can be found here to understand the structure and where and what to do.

    https://atadiat.com/en/e-arduino-core-source-files-make-new-core-building-steps/

    Regards,

     Stefan

  • Thank you Stefan.
    Will get back with some progress.
  • Hi,

    as the original question was solved, i would like to close this thread.
    Please feel free to comment again if you look for further assistance regarding this topic, it will re-open the thread. If you have a different question, please select "Ask a related question" or " Ask a new question".

    Best regards,
    Stefan
  • hi stefan
    can you help me out with this

    e2e.ti.com/.../787794

**Attention** This is a public forum