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.

  • Resolved

CCS/MSP430F67641A: TIDM-3PH-ENERGY5-ESD issues with Code Composer (instead of IAR)

Prodigy 170 points

Replies: 5

Views: 539

Part Number: MSP430F67641A

Tool/software: Code Composer Studio

I am working with the MSP430F67641 dev kit from www.ti.com/.../tidm-3ph-energy5-esd

The provided example code is written for IAR, but I only have a trial license and we can't justify the large expense for continuing to use IAR - so I've been working to get the code working under Code Composer Studio.

So far I've got it to the point that it compiles and seems to run - but it looks like the ADC10 and/or DMA ISRs don't work properly. When connected to the GUI, I can get correct-looking values for the RMS current (which is processed by the SD24 routines) but the RMS voltage (from the ADC10 routines) is stuck at zero. I set up a simple variable to count the number of times each ISR runs, and the SD24 ISR seems to continue running forever, as expected, but the ADC10 and DMA ISRs stop after around 5,000 runs and do not resume.

Is there something special that the IAR code for the TIDM-3PH-ENERGY5-ESD reference meter does with the ISRs? I've not used MSP430s very much before, is there something tricky about getting the ADC10s to work reliably?

  • Hello Sean,

    Thanks for your detailed post. I find it very strange that your ISRs are halting after a certain number of runs. So, the IAR code does not halt after 5,000 runs? It shouldn't. If I remember correctly, the ADC10 gets triggered by the SD24 module to keep everything synchronized. When you check if the ISRs are halted, can you check if their interrupt enables have been disabled? If you've tried porting the IAR assembly files to CCS, this could be the reason why the ISRs get halted. Since your RMS voltage is stuck at zero, perhaps there's a function that isn't returning correctly after a certain period of time and the code gets stuck, halting the ISRs. You could also check the Stack to see which function hasn't returned when the halt occurs.

    To save you time, I would strongly suggest using our newly-released Energy Measurement Design Center (EMDC) and software library for MSP430 devices with 24-bit Sigma Delta ADCs. It supports CCS and features an interactive GUI for quickly configuring the library, generating code, calibrating the board, and viewing results. However, the synchronization between the SD24 and ADC10 module is not supported by EMDC for the F67641A device. I would encourage you to consider using the MSP430F6779A device instead. While it may be more expensive than the MSP430F67641A, you'll be able to save a lot of time using EMDC. Using one of the EMDC example projects, you can generate code, program the EVM430-F6779, and view results in less than 5 minutes.

    I hope this helps.

    Regards,

    James

    MSP Customer Applications

    Check out our new Answers to Common Sigma-Delta ADC Questions on MSP MCUs app note!

    Check out the Increasing flexibility in your precision analog designs with a low-cost MSP430™ MCU blog featuring the MSP430i20xx MCUs.

  • In reply to James Evans:

    Thanks for the reply James,

    "If you've tried porting the IAR assembly files to CCS, this could be the reason why the ISRs get halted."

    Yeah I did port the IAR assembly, I actually found most of what I needed in the slac488 reference code (can't seem to find a URL to this now though) but did have to transpose a few IAR assembly things.

    I'll look into what these functions are returning, and the states of the interrupt enable bits.

    ..."I would strongly suggest using our newly-released Energy Measurement Design Center (EMDC) and software library..."

    Yeah I did have a look at the EMDC library, and I really like it! Unfortunately, the decision has already been made to use the F67641A so I'm a little bit stuck with having to get the firmware working on it. Depending on how I go, I might push to change to the F6779A but given it's a different footprint it unfortunately won't be as simple as a drop-in replacement.

  • In reply to Sean Lanigan:

    Sean Lanigan
    Yeah I did port the IAR assembly, I actually found most of what I needed in the slac488 reference code (can't seem to find a URL to this now though) but did have to transpose a few IAR assembly things.

    If you haven't done so already, check out the 7 Migration of C Code from IAR 2.x, 3.x, or 4.x to CCS and 8 Migration of Assembler Code from IAR 2.x, 3.x, or 4.x to CCS sections in the Code Composer Studio IDE v8.x for MSP430 MCUs user's guide.

    Sean Lanigan
    Yeah I did have a look at the EMDC library, and I really like it! Unfortunately, the decision has already been made to use the F67641A so I'm a little bit stuck with having to get the firmware working on it. Depending on how I go, I might push to change to the F6779A but given it's a different footprint it unfortunately won't be as simple as a drop-in replacement.

    I'm happy to hear that you've seen the new EMDC and that you like it! Thanks for the feedback. Unfortunately, supporting non-Sigma Delta ADC modules has not been a priority for us, so the F67641A is not supported. While more expensive, I think that changing to F6779A will be easier and quicker to implement. Perhaps, you could order the EVM430-F6779 and evaluate it. I'm sorry to hear that the packages don't match. These two parts feature two package types each and do share a common package type and number of pins, but I suspect that you are using the other package (which is fine).

    I've talked to our software teams internally about how the F67641A would be integrated into the EMDC and library, and the feedback that I got from them is that the effort (just the development work) to get everything working would be several weeks. At this point, it's been logged as a future feature request, but I don't see it getting added any time soon.

    Regards,

    James

    MSP Customer Applications

    Check out our new Answers to Common Sigma-Delta ADC Questions on MSP MCUs app note!

    Check out the Increasing flexibility in your precision analog designs with a low-cost MSP430™ MCU blog featuring the MSP430i20xx MCUs.

  • In reply to James Evans:

    Thank you, I had not seen that guide - I'm currently looking through it and will see if it helps fix the issue with the IAR code.

    I will also look at adding ADC10 support to the EMDC code just for our specific project - I can see how it would take several weeks to make it nicely integrated with the GUI design software and automated code generation, but for our specific case it seems like it might not be to hard to hack in support for it due to the nice use of the driverlib functions.
  • In reply to Sean Lanigan:

    It's been about a week since my last comment - I just wanted to provide an update that I've had what looks like a bit of luck getting the ADC10 converters to work with EMDC. Of course I haven't been able to add it to the GUI part of the EMDC, but only in the source in the Code Composer workspace. There's still a bunch of things I'm figuring out with how EMDC does its calculations, but the results I'm seeing so far with the hybrid chip look to be pretty stable and consistent.

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.