STM32H750 and Arduino IDE

Post here all questions related to STM32 core if you can't find a relevant section!
ddano007
Posts: 22
Joined: Mon Oct 05, 2020 9:08 am

STM32H750 and Arduino IDE

Post by ddano007 »

Hi, guys. I`m playing with WeAct STM32H750 board testing this processor for my application. Everything is fine: three USARTS, two I2C, 16-bit ADC... just two problems:
1, I`m not able to run Arduino example with SPI ILI9341 display, nor for SPI1 configuration MOSI PB5/MISO PB4/SCLK PB3/CS PA15, nor for SPI4 configuration MOSI PE6/MISO PE5/SCLK PE2/CS PE4. Isn`t there any trick for SPI?
2, built-in memory is quite small, I`m at 75-90% memory for yet developed programs. Is it possible to use Quad-SPI in Arduino for program storage?
Any tip is welcomed, Daniel.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32H750 and Arduino IDE

Post by fpiSTM »

Probably linked to this:
https://github.com/adafruit/Adafruit-GF ... y/pull/359

reported several time on the forum: viewtopic.php?p=8212#p8212

For QSPI, yes it should be possible.
We made it for MX25R6435F to store data.
https://github.com/stm32duino/MX25R6435F

so you could probably implement it for the Winbond W25Q128JV-DTR (if I'm not wrong).
https://github.com/WeActStudio/MiniSTM3 ... 20plus.pdf
ddano007
Posts: 22
Joined: Mon Oct 05, 2020 9:08 am

Re: STM32H750 and Arduino IDE

Post by ddano007 »

Thanks for tips.
I finally made SPI display to work ( at this moment just for few second, after the white screen come - so I will continue how to fix this ).
However I didn`t find, how to use QSPI with my WeAct board. Nor the basic demo. ino from Your link is working. If I`m looking right to WeAct board schematics, no HW modifications are required for QSPI, I just added setup lines

MX25R6435F.setDx(PD11, PD12, PE2, PD13); // using pin number
MX25R6435F.setSCLK(PB2);
MX25R6435F.setSSEL(PB6); // using PinName

but don`t work.
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32H750 and Arduino IDE

Post by fpiSTM »

The library is for an other memory. I provide it as example so you have to implement it for the memory of the weact board.
ddano007
Posts: 22
Joined: Mon Oct 05, 2020 9:08 am

Re: STM32H750 and Arduino IDE

Post by ddano007 »

OK, so I`m going to look for my memory driver.
However the basic question: am I able to use external QSPI memory to store/ run Arduino sketch?
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32H750 and Arduino IDE

Post by fpiSTM »

It should be possible but never tried
ddano007
Posts: 22
Joined: Mon Oct 05, 2020 9:08 am

Re: STM32H750 and Arduino IDE

Post by ddano007 »

Finally I replaced original QSPI (U7) with MX25R6435FM2IH0 on WeAct board ( SPI / U8 is still original ).
Examples from
https://github.com/stm32duino/MX25R6435F
library are working. I was looking how to store sketch to MX25R6435FM2IH0, but find nothing.
When programming memoryMappedMode.ino in DFU mode via USB still get report "Sketch uses 34932 bytes (26%) of program storage space. Maximum is 131072 bytes."

STM32CubeProgrammer v2.5.0 reports:

USB speed : Full Speed (12MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in FS Mode
SN : 200364500000
FW version : 0x011a
Device ID : 0x0450
Device name : STM32H7xx
Flash size : 2 MBytes (default)
Device type : MCU
Device CPU : Cortex-M7

Any help with storing sketch to MX25R6435FM2IH0, please?
wystewart
Posts: 3
Joined: Mon Mar 27, 2023 4:15 pm

Re: STM32H750 and Arduino IDE

Post by wystewart »

I'm working on storing arduino sketch in qspi on a stm32h750b-dk board but so far have not succeeded. Work in progress. But the procedure goes something like this:

1. Create a bootloader in stm32cubeide stored in 750 internal flash. This would configure the qspi, then enable it in memory mapped mode. The app then jumps to the qspi code. Note clock config must be the same in loader as in arduino code. There is sample code out there from stm how to create this bootloader, but instructions are not complete so it takes some effort
2. Modify the variant ld file to put the flash at 0x90000000 instead of 0x08000000, and set size correctly. This will force the linker to link the code for the qspi memory range (theoretically)
3. Program arduino bin file (look in user local/temp/arduino directory with stm32cubeprogrammer. But you need the correct loader for your board so that it xan program qspi. I have not figure out how to program automatically from arduino ide.

I have the boot loader working but not yet able to jump to arduino code without hard fault. Work in progress

If anyone has done this before tips and help would be appreciated
ddano007
Posts: 22
Joined: Mon Oct 05, 2020 9:08 am

Re: STM32H750 and Arduino IDE

Post by ddano007 »

Hi, guys after a longer time. I made user board using 25MHz crystal & 32kHz clock crystal - brief derivate from WeAct STM32H750, so I`m using WeAct STM32H750 board in Arduino IDE for compiling. It takes approx 200mA with my Arduino sketch, so I`d like to test it at 240MHz to decrease the consumption. Is there a simple way to do that in Arduino? Thanks.
Attachments
H2_CPU_02.jpg
H2_CPU_02.jpg (89.92 KiB) Viewed 2927 times
H2_CPU_01.jpg
H2_CPU_01.jpg (94.83 KiB) Viewed 2927 times
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32H750 and Arduino IDE

Post by fpiSTM »

You could redefine the system core clock config.
Post Reply

Return to “General discussion”