MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.27k stars 19.23k forks source link

Newbie HAL_STM32 #12539

Closed tna11 closed 5 years ago

tna11 commented 5 years ago

Hello,

Newbie here. I can compile for an stm32f103 on platformio using the HAL_STM32F1 but cant suss out how to compile using the HAL_STM32 core. I'm use to using the stm32, but not via an arduino framework.

Plan is to get Marlin 2 up and running on a MKS Robin board, getting there with the old hal, but prefer to concentrate on the new HAL_STM32 core.

Thanks in advance.

jmz52 commented 5 years ago

Support for MKS Robin is a bit limited at them moment. On-board SD card is connected to SDIO interface, which is not supported yet. TFT screen on FSMC is not supported too.

Please note, that should you wish to return to MKS closed-source firmware you will need to re-install bootloader. And there is one you can download: https://reprap.org/forum/read.php?13,716774,839792#msg-839792

tna11 commented 5 years ago

Thanks for the link to the bootloader, will try it later.

I've got the sd card and display working on the mks Robin board, but not on marlin or under the arduino framework. Want to start work on it under the newer stm32_hal

xC0000005 commented 5 years ago

@tna11, which display? The bootloader has three different display initialization sequences that I've found (and there could be more).

tna11 commented 5 years ago

Will have to check, tried initialisation code for the ili9341 and that didn't work, so went with another module which worked. To be fair, was only trying to get my display to work at first.

Did finally get the marlin 2 firmware compiling with the HAL_STM32 after the recent commit.

Slowly getting somewhere with board

jmz52 commented 5 years ago

@tna11, what display you have - 2.8 or 3.2"? Were you able to get controller ID from display during initialization sequence?

xC0000005 commented 5 years ago

The default booloader looks for displays with a code of: 0x8989 (after subtracting 0x8900) 0x9325 0x9328 0x9341 and 0x1505. It also has an odd branch looking specifically for 0x8552, which must be an else condition for the 8989.

On Dec 10, 2018, at 9:40 AM, tna11 notifications@github.com wrote:

Will have to check, tried initialisation code for the ili9341 and that didn't work, so went with another module which worked. To be fair, was only trying to get my display to work at first.

Did finally get the marlin 2 firmware compiling with the HAL_STM32 after the recent commit.

Slowly getting somewhere with board

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/12539#issuecomment-445904410, or mute the thread https://github.com/notifications/unsubscribe-auth/Aeppcd9qRp71DGuxaNCl-BrZCHaJI6XSks5u3pykgaJpZM4Yx1-A.

tna11 commented 5 years ago

I've got the 3.2" display. Pretty sure I couldn't get the ID from the display when testing the code, will look into it again, was just trying to to get a display.

0x8989 = SSD1289 0x9325 = ILI9325 0x9328 = ILI9328 0x9341 = ILI9341 0x1505 = R61505U 0x8552 = ST7789V ( this and the SSD1289 could have similar init )

xC0000005 commented 5 years ago

@tna11, do you have the code you wrote that you said worked with the MKS Robin SD card/TFT pushed somewhere? I'm trying to get the Lerdge-X SD card working and would like to look at code I know works as a guide to how to adapt it.

tna11 commented 5 years ago

I modified this library for the stm32f103zet6. It may work straight away for the stm32f4, bar the sd card detect pin. This is using the sdio.

https://github.com/stm32duino/STM32SD

Will post some display code later, when cleaned up. Never used the arduino framework before.

jmz52 commented 5 years ago

Just got an ID from my 3.2" display (TFT_V2.0 2018-8-15) Display ID (Reg04) is 858552, so controller is ST7789V.

jmz52 commented 5 years ago

@xC0000005 Are these display IDs from Robin's bootloader or from Lerdge's?

boelle commented 5 years ago

@tna11

This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. (As noted on this page.) For best results getting help with configuration and troubleshooting, please use the following resources:

After seeking help from the community, if the consensus points to to a bug in Marlin, then you should post a bug report. Before posting a bug report please test with bugfix-2.0.x to check if problem is gone

boelle commented 5 years ago

@thinkyhead think we can close this one

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.