Hello!
I haven't written MSP430 code for a while, but there are plenty of examples for every microcontroller.
Depending on what you want, there are 2 kinds of code. One which is very much like STM32 HAL
layers, high level of abstraction, and not necessarily optimized and another kind which gives you
access to registers. These files are usually called slacxxx.zip. xxx is usually a 3 digits number, but
some of the old chips have 2 digits.
I prefer the latter ones. It's very easy to understand, every source code fits in a single page, and it
shows you one item at a time. For example how to use timer A with interrupt, etc.
As for I2C, there are many versions, master and slave.
Dora.