2024-10-15 03:11 AM
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.
Solved! Go to Solution.
2024-10-15 03:20 AM
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:
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?
2024-10-15 03:20 AM
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:
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?
2024-10-15 03:29 AM
On adapting Arduino code to STM32CubeIDE (second part of post):
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...
2024-10-21 03:00 AM
Hi everyone,
I’ve recently transitioned from an Arduino environment to using STM for my project. In my previous setup, I was utilizing the LTC81x and LTC6811 libraries, which relied on Arduino.h, SPI, and Linduino. Now that I’ve switched to STM, I’m trying to port the logic of these libraries to work with STM.
I would appreciate any guidance on the following:
Considerations: What should I be mindful of when adapting these Arduino-based libraries to STM? Are there any key differences or specific STM functionalities I should consider?
Challenges: What potential issues might arise during the process, especially with communication protocols or hardware-level differences?
Library Structure: Should I aim to implement the logic of the different libraries (Arduino.h, SPI.h, Linduino.h) into one unified STM library, or would keeping them separate be more effective?
2024-10-21 03:11 AM
rather than start a whole new thread on the same issue, lets keep this in one.
You could un-mark the solution:
@hvs_learn wrote:In my previous setup, I was utilizing the LTC81x and LTC6811 libraries, which relied on Arduino.h...
So you already have this working on Arduino/Linduino?
Is there a particular reason to switch?
Again, there are Arduino cores for STM32...
@hvs_learn wrote:
Considerations: What should I be mindful of when adapting these Arduino-based libraries to STM? Are there any key differences or specific STM functionalities I should consider?
One thing is to decide whether you want to keep using C++, or switch back to C.
@hvs_learn wrote:
Library Structure: Should I aim to implement the logic of the different libraries (Arduino.h, SPI.h, Linduino.h)
Note that these are just Header files - not Libraries.
You can structure your code in whatever way you prefer.