Hi Giovanni,
while porting my LTDC and DMA2D demo from ChibiOS 2.6 to 3.0 I found that the current 3.0 trunk is still missing some STM32 core definitions to describe those peripherals.
You can find the modified files in the attachment. Since they are core features of the STM32 device, and not peripheral drivers, I guess they should be merged in the trunk instead of being patched by some community branch. Also, some board definitions are wrong and need to be updated.
I will upload the updated demoboard project to the community git repository soon, including peripheral drivers.
Missing LTDC and DMA2D related core stuff
Moderators: RoccoMarco, barthess
Missing LTDC and DMA2D related core stuff
- Attachments
-
- LTDC_DMA2D_changed_files.zip
- Changed files for LTDC and DMA2D support
- (30.79 KiB) Downloaded 225 times
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Missing LTDC and DMA2D related core stuff
Thanks The ported demo project and peripheral drivers are currently available in my forked community repository at:
https://github.com/TexZK/ChibiOS-Contrib/tree/ltdc_dma2d
I'm moving some stuff to better places in order to finalize the pull request of the official community repository.
https://github.com/TexZK/ChibiOS-Contrib/tree/ltdc_dma2d
I'm moving some stuff to better places in order to finalize the pull request of the official community repository.
Re: Missing LTDC and DMA2D related core stuff
Hi TexZK. Good job! Have you tested the code on 429 discovery board. I couldn't get it to work. It seems it does not initialize ltdc correctly.
Re: Missing LTDC and DMA2D related core stuff
Ok, I've found the problem. In the patch I sent to Giovanni in the first post, I didn't include some old code from the 2.6 version, located in the board.c file.
What I'm writing here below is a quick patch taken from the old demo, which will be put into the community HAL files instead.
Include the needed files:
Initialize the peripherals:
Let me know if it works now. As written before, I'm including the LTDC driver into the community HAL source code, plus some household stuff, which are the way to go.
What I'm writing here below is a quick patch taken from the old demo, which will be put into the community HAL files instead.
Include the needed files:
Code: Select all
#include "ili9341.h"
#include "stm32_ltdc.h"
#include "stm32_dma2d.h"
extern ILI9341Driver ILI9341D1;
Initialize the peripherals:
Code: Select all
/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
#if STM32_LTDC_USE_LTDC
ltdcInit();
#endif
#if STM32_DMA2D_USE_DMA2D
dma2dInit();
#endif
ili9341ObjectInit(&ILI9341D1);
}
Let me know if it works now. As written before, I'm including the LTDC driver into the community HAL source code, plus some household stuff, which are the way to go.
Re: Missing LTDC and DMA2D related core stuff
@TexZK
Could you test your demo after merging? I have moved your linker script into
project directory because main chibios repository already contains SMT32F429xI.ld
@Giovanni
Is there way to elegantly redefine memory region defined in linker script? From Makefile
for example, or from tiny wrapper under the main linker script?
Could you test your demo after merging? I have moved your linker script into
project directory because main chibios repository already contains SMT32F429xI.ld
@Giovanni
Is there way to elegantly redefine memory region defined in linker script? From Makefile
for example, or from tiny wrapper under the main linker script?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Missing LTDC and DMA2D related core stuff
LD scripts are not that flexible, if you need to do custom layouts probably it is better to copy the .ld in the project directory.
Giovanni
Giovanni
Re: Missing LTDC and DMA2D related core stuff
I've updated my community repository to remove dependencies on the ST peripheral library, and use the SDRAM by FSMC driver of the ChibiOS community instead.
Ok for the linker script, that's an easy fix, I'll move it too
Ok for the linker script, that's an easy fix, I'll move it too
Last edited by TexZK on Sun Jun 28, 2015 10:42 pm, edited 2 times in total.
Re: Missing LTDC and DMA2D related core stuff
I've see your pull request. Did SDRAM code works as expected?
Who is online
Users browsing this forum: No registered users and 17 guests