cancel
Showing results for 
Search instead for 
Did you mean: 

LT6810 Library import in stm32H753 code

hvs_learn
Associate

I am writing the code stm32H7ZIT6 based master to control slaves based on LTC6810 ic. Although, I am getting errors while importing the specific LTC libraries needed for making this setup work. I am trying to import specifically these libraries 
1. LT6810.h

2. LT681x.h

3. LT_SPI.h 

4. Linduino.h

but all these are dependent on arduino-based libraries. I have limited experience with stm32, can you help me with what I am doing wrong.img.png

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Evangelist III

It's not going to be a simple matter of just importing straight into STM32CubeIDE - you're going to have to "unpick" the Arduino/Linduino dependencies.

Note that there is an Arduino core available for STM32:

https://github.com/stm32duino

Might be easier to start by getting this Arduino code into that.

Or just start by getting it working in the standard Arduino IDE on a standard Arduino?

Maybe AD can provide some guidance on that?

https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-development-platforms/linduino.html

 

 

View solution in original post

2 REPLIES 2
Andrew Neil
Evangelist III

It's not going to be a simple matter of just importing straight into STM32CubeIDE - you're going to have to "unpick" the Arduino/Linduino dependencies.

Note that there is an Arduino core available for STM32:

https://github.com/stm32duino

Might be easier to start by getting this Arduino code into that.

Or just start by getting it working in the standard Arduino IDE on a standard Arduino?

Maybe AD can provide some guidance on that?

https://www.analog.com/en/resources/evaluation-hardware-and-software/evaluation-development-platforms/linduino.html

 

 

Andrew Neil
Evangelist III

On adapting Arduino code to STM32CubeIDE (second part of post):

https://community.st.com/t5/stm32cubeide-mcus/how-to-covert-the-code-according-to-stm32cubeide/m-p/720546/highlight/true#M30694

 

The whole point of the Arduino framework is that it "hides" the underlying hardware details from you, providing platform-independent interface like "wire" for I2C and the SPI library for SPI:

https://docs.arduino.cc/language-reference/en/functions/communication/SPI/

 

So one way to take Arduino code into other ecosystems (eg, STM32CubeIDE) is to just implement those interfaces...