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.

Porting project from msp430F5438 to MSP430f2274

Other Parts Discussed in Thread: MSP430F5438, MSP430F2274, Z-STACK

Dear friends ,

I want to port the project of home auto (sample light) from msp430F5438 to MSP430f2274  ,any suggestion plz ??any documentations or recommendation ?? i got for example for the spi configuration this :  

#define HAL_ZNP_RUN() st( P1OUT |= BV(HAL_ZNP_RST_BIT); )
#define HAL_ZNP_RST() st( P1OUT &= ~BV(HAL_ZNP_RST_BIT); )

#define HAL_ZNP_MRDY_BIT 6
#define HAL_ZNP_MRDY_CFG() st( P1SEL &= ~BV(HAL_ZNP_MRDY_BIT); \
P1OUT |= BV(HAL_ZNP_MRDY_BIT); \
HAL_ZNP_MRDY_CLR(); \
P1DIR |= BV(HAL_ZNP_MRDY_BIT); )
#define HAL_ZNP_MRDY_CLR() st( P1OUT |= BV(HAL_ZNP_MRDY_BIT); )
#define HAL_ZNP_MRDY_SET() st( P1OUT &= ~BV(HAL_ZNP_MRDY_BIT); )

how can i  understand this configuration ?? thanls for advance

  • Hi seenn,

    I'm not familiar with the particular example that you are porting.

    You are moving some code that is currently implemented on an MSP430F5438 device, onto an MSP430F2274 device? Have you confirmed that the MSP430F2274 has enough flash space to support this size of code? Can you link the example code that you are trying to port? The MSP430F2274 only has up to 32kB of Flash, whereas if your code was currently using the MSP430F5438 device, that has up to 256kB of Flash so you are porting from a much larger part to a much smaller part. You should find if this is even feasible, by building the code for the MSP430F5438 device, and then in CCS or IAR open up the .map file to find the code size.

    Regards,

    Katie

  • Thanks for your response ,i know that the size of the flash memory is too limited ,thats why i want to eliminate many component in my project ,but the problem is how can i change the definition of pins (ana registers) from 5438 to 2274 !!!which document you (plz) recommend me me to read to help me doing this modifications

    Regards
  • Hi seenn,

    There is a good migration guide for going from MSP430F2xx parts to MSP430F5xx parts here - you'll just be going the other direction with your porting: www.ti.com/.../slaa396

    First, you'll need to change the device in the project settings to select MSP430F2274. If the project is including "msp430.h" then this will automatically include the correct device header file with correct pin and register definitions.

    Then you'll want to find what clock sources and frequencies are used for the MSP430F5438 for MCLK, SMCLK, and ACLK and set up the MSP430F2274 similarly. The clock systems on these parts are very different, so this will take some porting effort to compare the UCS module on the MSP430F5xx parts to the BCS+ module on the 2xx parts. You can find more information in the migration guide www.ti.com/.../slaa396 and by comparing the chapters in the 5xx user guide www.ti.com/.../slau208 and the 2xx user guide www.ti.com/lit/pdf/slau144.

    Next, you'll want to go through all of the code and see what peripherals it uses, and then find if those are different in the MSP430F5438 and in the MSP430F2274, and make adjustments. You can find definitions for all of the registers in the MSP430F5438 modules in this 5xx user's guide www.ti.com/.../slau208 and then you can compare to the definitions for the same modules on the MSP430F2274 by looking at the 2xx user's guide www.ti.com/.../slau144.

    You'll also need to compare the datasheets of the two devices - that is where you will find the different pins that you will need to use for the different functions, and how to configure them. www.ti.com/.../msp430f5438 www.ti.com/.../msp430f2274 There is a section in each datasheet about how to configure the GPIO registers to select different functions on different pins, and there is another section that shows the pinout of the device, which will help when you are figuring out which pins you are going to connect to other devices in your system.

    You'll need to understand what the code does and how it works for this migration to work out well for you. You are trying to port one of the Z-stack examples, http://www.ti.com/tool/z-stack correct? For more help in understanding the ZNP example code from TI or specific questions about that code, you may want to post in the Zigbee & Thread forum where they will be more familiar with this code.

    Hope this helps to point you in the right direction.

    Regards,
    Katie
  • i want to thank u for 10000000... time .And i want to tell u that a member in this E2E recommend me to modifiy the board-cfg.h of the msp430f5438!!! and to dont begin with the 2274 project ,but i find this very difficult because there's many definitions for pins in this .h file !!!! I think i will use your methods ,thanks ...

    regards
  • Dear Katie ,

    for the document ,it talk about how to migrate from 2274/5438 to x5xx and not from 5438 to 2274 !!!
  • Hi seenn,

    Yes that document is about the differences between the F5xx (including F5438) from the F2xx (including F2274). As I mentioned above, even though the document talks about going from 2xx to 5xx, you should be able to use the same information to go the other direction - just keep this in mind when reading the document. The reason it is written as migrating from 2xx to 5xx is that this is the direction that most people migrate, as the 5xx are larger more powerful parts, and people are usually upgrading. I hope that this helps.

    Regards,
    Katie
  •  Dear Katie,

    It's Fx5xx not F5XX plz verify with tne target ,this doc compare x5xx to 2274 not 5xx to 2274 

  • No, it's "x5xx", where the first "x" stands for the "F".
  • Clemens is right - that is the correct document for the families you are trying to migrate.
    -Katie
  • thanks :) ,and how much time will take for this migration ??? approximately i mean

    regards
  • Hi seenn,

    Sorry for the delayed response, as I have been out of office for the holidays. The time it will take you to migrate code from one MSP to another will depend on how familiar you are with the existing code, as well as how much experience you have with different MSP430 families, and how many people you have working on it (in addition to the complexity/structure of your existing code). I can't really provide any good estimate for it, it's something you would know better yourself.

    Regards,
    Katie

**Attention** This is a public forum