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.

TMAG3001: TMAG3001_Example_Code mspm0l1306

Part Number: TMAG3001
Other Parts Discussed in Thread: MSPM0L1306, , MSP432E401Y

Tool/software:

We have purchased the TMAG3001evm and mspm0l1306.  Alicia revised a project and sent code  tmag3001evm_lp-mspm0l1306evm_I2C+SENT'

The code works well.

I need to make some additions and downloaded TMAG3001_Example_Code this weekend because it contained additional code using I2C for TMAG3001,  The code is not a project but a collection of routines: hal.c, hal.h, main.c, tmag3001.c, and tmag3001.h.

The problem is that the routines I need all require access to TMAG3001 via I2C. I need to include the additional subroutines in the version I have. Unfortunitely since the code is not a project I don't have a syscfg. Also I was not able to detect where some of the include files came from.

I noticed many of the new subroutines begin with map_. I believe this  is because the code is for a different mcu.

Can you provide the proper include files, so I can get the source code for the additional code? I could include the source in my code,

Or if you have a syscfg I could build the code and extract what I need.

Thanks

eric@avidasw.com edulicki@avidasw.com

  • Hi Eric,

    Thank you for posting to the Sensors forum!

    The code example were made with the MSP432E401Y MCU in mind, which is where those functions come from. I would recommend downloading the following SDK as these are where the functions come from: https://www.ti.com/tool/SIMPLELINK-MSP432-SDK 

    Alternatively, you can also use the I2C of the MCU that you are currently using to communicate to the TMAG3001. The goal of the example code was to just give an example of how users can communicate to the TMAG3001, which includes how to read/write to multiple I2C registers (which should just be standard I2C). The hal.c and hal.h functions are the more MCU specific code which includes the I2C communications and some MCU specific interrupt routines. The tmag3001.c and tmag3001.h files includes other functions which are meant to be used to show which registers to read/write to when reading data and configuring the device.

    Best,

    ~Alicia 

  • Thanks. Most helpful

    eric@avidasw.com edulicki@avidasw.com