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.
Is it possible to find a tested driver or protocol for the i2c of the MSP430FR2522 using the interrupt routine to manage the RX, TX, NACK condition?
The official driver doesn't use the interrupt and it is not compatible with a low power system.
Hi Samuelr,
Here are some code examples in Resource Explorer on using I2C in the MSP430FR2522. You can also find a zip of the code examples on the FR2522 product page under the "Design & Development" tab under "Software development".
Thanks,
Urica Wang
Thanks, but this is the example provided in the CCS. The problem is that the example is not encountering both writing and reading, simplifying too much the i2c driver. I also see that there are the eusci_b drivers from ccs, but they are not using the interrupts.
Hi Samuelr,
There are additional examples on Resource Explorer using both reads/writes for I2C such as this and this. You can refer to the other examples and the device user guide on also handling the NACK condition. The eusci_b_i2c drivers in driverlib do use the same interrupts, they are just defined as different names (see here, go to Files->Files List->eusci_b_i2c.h).
Thanks,
Urica Wang
Thank you Urica,
I have another question. Do you have any suggestions to build up a fail-safe layer on I2C? we are encountering difficulties because it seems that our I2C communication is very disturbed and we want to write a firmware layer on top of the I2C driver provided to prevent any block and send data.
Thanks
Samuele
This is really a new question (deserving of a new thread), but some suggestions:
1) If at all possible, design-in a reset capability for the slave.
If the slave has a Reset pin, that's handy, but my experience is that few I2C devices provide this.
When I can (which is actually most of the time) I power the slave from a GPIO pin, so I have heavy-hammer control from my program.
2) The EUSCI UCCLTO feature is more limited, but does provide something.
3) TI publishes an MSP430 serial port troubleshooting guide, but I can never seem to find it when I look for it. [Urica?]
Hi Bruce, Samuele,
I found this guide, https://www.ti.com/lit/slaa734, for solutions to common serial communication issues on MSP devices that contains tips on implementing I2C.
Thanks,
Urica Wang
Hi Samuele,
See the edited reply above, I've added the hyperlink.
Thanks,
Urica Wang
**Attention** This is a public forum