Cant figure out how to use this to connect my STM32F072RB to the NHD-4.3-480272FT-CTXL-CTP ,while using the ArduinoIDE to code the STM #92
-
I'm very new to this , and I'm struggling to understand the documentation well enough to figure out how to do it. Same reason why i'm using the arduino ide to try and code the stm as cube ide was a little too hard to directly start out with. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Well, I am not really supporting the Arduino IDE so that part is not actually documented on my side and things are bit messy. I do happen to have an Arduino IDE compatible demo project though and I just modified it a little: This has the latest files from the repository. The target configuration used is generic Arduino as I do not have a target for the STM32F072RB specifically. `` #if !defined(EVE_PDN) Note, this file is not visible directly when openeing the .ino in the Arduino IDE and you can not use Sketch/Add File as this would copy the file to the parent folder but it would not be used when compiling the project. I just ran Arduino IDE 1.8.19, installed https://github.com/stm32duino/Arduino_Core_STM32. I am quite positive that it will work, although a bit slower as the controller would allow due to a lack of support for DMA in the vanilla Arduino SPI class and code in my library to work around this for the STM32F072RB. Hmm, and it builds for the Nucleo-C031C6 as well, nice. |
Beta Was this translation helpful? Give feedback.
-
I am not really using CubeIDE, at least not beyond configuring the pins and generating init code. In CubeIDE this can be done thru the project properties: However, as I wrote above, there is no specific STM32F072RB in my code so far. Here is a test project I did back in march for a board I designed: This was merely a test for the board and not an actual project. In contrast to this one: This does compile for a bunch of STM32 but does not actually do anything as the main.c has no code to actually configure the controller. The configuration is done in the platformio.ini file. There already is this: So the STM32F0 family already is supported. Changing it like this: And the simple example compiles fine, HAL driver and everything else. [env:STM32F072] Ugh, adding the pins to platformio.ini does not work though. |
Beta Was this translation helpful? Give feedback.
Ah, still using the Arduino framework.
That should be far easier since the part that is missing from non-Arduino example is the controller initialization including SPI and pins, but the Arduino framework already takes care of that.
Use this as a starting point:
https://github.com/RudolphRiedel/FT800-FT813/blob/5.x/examples/EVE_Test_Arduino_PlatformIO/platformio.ini
Then in platformio.ino:
[env:STM32F030]
platform = ststm32
board = nucleo_f030r8
upload_protocol = stlink
build_unflags = -Os
build_flags =
${env.build_flags}
-D EVE_CS=10
-D EVE_PDN=8
-O2
I only can't confirm this right now, I need to leave for work.