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.

MSP430I2041: Trying to receive HEX sequence of metering by TX and RX

Part Number: MSP430I2041
Other Parts Discussed in Thread: MSP-FET

  Hello Ti community and Ti experts, i am trying to receive the HEX sequence of 50 bytes that gives the measures. We did a layout with the Integrated Circuit MSPI2041 and we are trying to communicate the TX and RX with and 3v3 micro using arduino IDE.

  For the serial communication, we are using 9600 bauds/s that is the speed of the MSP. We send a password of 26 bytes when the board with the msp starts, that is:{0xFE,0xFE,0xFE,0xFE,0x68,0x99,0x99,0x99,0x99,0x99,0x99,0x68,0x23,0x0A,0x60,0x00,0x34,0x12,0x78,0x56,0xBC,0x9A,0xF0,0xDE,0x2B,0x16}. The board powers the micro, so when the board starts the micro starts sending the request.

 And after that, a loop starts sending a request of 18 bytes that is {0xFE,0xFE,0xFE,0xFE,0x68,0x99,0x99,0x99,0x99,0x99,0x99,0x68,0x23,0x02,0x61,0x00,0xEC,0x16} . And we wanted to receive after that a sequence of 50 bytes that indicate the measures but we are receving 0 in all values.

 Don't know what to do anymore, already tried to send the password first, after that the request and all that is received are zero values.

  • Hi Nathan,

    Do you have a way to debug the MSP430i2041 on your board? Hopefully, you have included the JTAG interface in your layout. This way, you could connect to the running target (i2041) and debug why it's not sending the write values.

    What code base did you use before modifying it? Was it from one of our legacy IAR-based reference designs or our newer Energy Measurement library (commonly called EMDC)? The packet above looks like it's similar to the IAR-based reference designs. If you've made some changes to the code, then that could be what's causing the issue. Between debugging the target with the MSP-FET and viewing the serial communication with a logic analyzer, you should be able to figure out what's not working as desired.

    Regards,

    James

  • I will try James. But it should be working, the way i coded what more do i need to comunicate than a password and a request sequence ? Do you wanna see the code i made ?

  • Hi Nathan,

    I think my earlier comments about debugging the device while using an oscilloscope or logic analyzer will help you figure out why your code isn't working as desired. Can you try simplifying your code to weed out what may be the issue? Looking at your first post, I see that you're sending 50 bytes for the results. I would make sure that you're not running out of bandwidth for the metrology calculations and communication between the SD ADC samples. If your host is polling too often, then this could be the issue.

    Regards,

    James

  • So, i need to wait more before consult the msp ? But how long ?

  • Hi Nathan,

    Can you configure your host to poll once and see if the response from the target MSP430 is as expected? If that works, then it indicates that your code is working on the MSP430 and you can move on to figuring out the maximum poll rate from the host.

    Regards,

    James

  • We used FTDI to solve the problem. Be free to use too.

**Attention** This is a public forum