BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Question about ESD FT812 project porting to STM32  (Read 9228 times)

kevin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Question about ESD FT812 project porting to STM32
« on: December 07, 2022, 08:40:49 AM »

hi everyone ,

I'm try to porting ESD4.15.1.0 export MSVC project(ME812A) to stm32 (NUCLEO-H723ZG).

I used STM32CubeFW_H7 V1.10.0 to develop stm32.
 
I refer to "ESD-4.10-Exported-Project-Porting-Guide-for-STM32L4-Discovery-Board-and-FreeRTOS.pdf" to porting and get some problem.
https://brtchip.com/wp-content/uploads/2021/06/ESD-4.10-Exported-Project-Porting-Guide-for-STM32L4-Discovery-Board-and-FreeRTOS.pdf

I can display some of ESD widgets like buttom and lable on the screen , but not image widgets.
So , I tried to add SD card to STM32 to used FATFS .

After I add MX_SDMMC1_SD_Init() before ESD_Start();
It can not  Start Frame successfu now . (I haven't even added FATFS yet...)

If i annotation MX_SDMMC1_SD_Init() . I get message from serial port will be : success.txt
If I add MX_SDMMC1_SD_Init() . I will get message like : fail.txt

I don't understatnd why this MX_SDMMC1_SD_Init() make it different.

Code: [Select]
//generator by stm32cubeIDE-->stm32cubeMX
int main(void)
{
 
  HAL_Init();
 
  SystemClock_Config();

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_SPI1_Init();
  MX_DMA_Init();
  MX_USART3_UART_Init();
  MX_SDMMC1_SD_Init();

  osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 512);
  defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
 
  osKernelStart();

}

void StartDefaultTask(void const * argument)
{
   ESD_Start(); // this is rename from function main() of App_Generated.c

  for(;
  {
    osDelay(1);
  }
 
}


1. How do I fix this?

2. Is there anything tutorial about used FATFS to make img widgets work from sd card of stm32?

If need more detial , Please leave an email and what info you need.

Thanks for any suggestions and replies.
Logged

kevin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question about ESD FT812 project porting to STM32
« Reply #1 on: December 07, 2022, 10:23:22 AM »

-Add the other fail return serial data:

Code: [Select]
Serial port COM3 opened
Copyright (C) Bridgetek Pte Ltd
sizeof(Esd_GpuHandle): 4
sizeof(Esd_ResourceInfo): 16
sizeof(Esd_FontInfo): 44
sizeof(Esd_RomFontInfo): 8
EVE ROM_CHIPID after wake up 0
EVE ROM_CHIPID after wake up 0
EVE ROM_CHIPID after wake up 0
EVE ROM_CHIPID after wake up 0
EVE chip id 812 1.0
EVE register ID after wake up 7c
EVE clock frequency set to 60 MHz
Single channel SPI
Touch engine is not ready
All engines are ready
Display refresh rate set to
Configure coprocessor defaults
EVE configuration ready
Esd_Calibrate: Start Frame
Coprocessor fault
Esd_Calibrate: End Frame
Touch screen transform values are A 0x10000,B 0x0,C 0x0,D 0x0,E 0x10000, F 0x0
Calibrate failed
Reset coprocessor
Use handle 0, font 27
Coprocessor fault
Reset coprocessor
Use handle 0, font 27
Coprocessor fault
Reset coprocessor
Use handle 0, font 27
Coprocessor fault
Reset coprocessor
EVE Assert Failed: (wr = EVE_Hal_rd16(phost, REG_CMD_WRITE)) == 12 (in file '../esdProject/FT_Eve_Hal/EVE_Util.c' on line '1337')
Use handle 0, font 27
Coprocessor fault
...
screen will loop in Trying to display the screen and getting the error....
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: Question about ESD FT812 project porting to STM32
« Reply #2 on: December 07, 2022, 12:19:29 PM »

Hello,

Thank you for your question.

Could you please let me know how you have configured the images in your ESD project?
Are these PNG/JPEG images or have you chosen to convert these to a format such as RGB565?

The error messages indicate a co-processor fault, so it is likely that this is related to loading the image data, this is probably related to reading the image data from the SD card.
Do you have any functions similar to MX_SDMMC1_SD_Init() where the data can be read from the SD card into the EVE application/RAM_G or have you modified any of the ESD to code to account for the source location of these images being on the SD card?

Best Regards,
BRT Community
Logged

kevin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question about ESD FT812 project porting to STM32
« Reply #3 on: December 08, 2022, 07:54:45 AM »


Hi ,Could you please let me know how you have configured the images in your ESD project?
Are these PNG/JPEG images or have you chosen to convert these to a format such as RGB565?
    In Resources -> .png file Properties -> format , I used L1 / ARGB1555 / RGB332 ... format to test.
    EVE_ENABLE_FATFS is defined to 0 in  “FT_Eve_Hal\EVE_LoadFile_FATFS.c” .
    Also my stm32 project didn't start to get file from sd card (just init sdmmc interface) .
    That mean I didn't try to get the img file.


And I created a new project there are only few button to switch page , no img file / widgets .
It still have problem with MX_SDMMC1_SD_Init().

This is return serial data :
Code: [Select]
Serial port COM3 opened
Copyright (C) Bridgetek Pte Ltd
sizeof(Esd_GpuHandle): 4
sizeof(Esd_ResourceInfo): 16
sizeof(Esd_FontInfo): 44
sizeof(Esd_RomFontInfo): 8
EVE ROM_CHIPID after wake up 0
EVE ROM_CHIPID after wake up 0
EVE chip id 812 1.0
EVE register ID after wake up 7c
EVE clock frequency set to 60 MHz
Single channel SPI
Touch engine is not ready
All engines are ready
Display refresh rate set to
Configure coprocessor defaults
Coprocessor fault
and then blocking.

I am attempting to port an exported ESD project to the STM32H743/753 series MCUs by following this guide.
https://brtchip.com/wp-content/uploads/2021/06/ESD-4.10-Exported-Project-Porting-Guide-for-STM32L4-Discovery-Board-and-FreeRTOS.pdf
The ports of "EVE_HalImpl_....c" & "EVE_Platform_....h" for the STM32 were derived from the files found here and modify to H7 series .
https://github.com/kaetemi/nuklear_eve/tree/master/samples/STM32L476GDISCOVERY/Src/Eve/dependencies/eve_hal

Could it be something wrong with my porting?
But without MX_SDMMC1_SD_Init(), it can still be displayed normally....

Can you leave an email ?
Let me send you my project files if needed, because attachments have size limit.

thanks.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 742
    • View Profile
Re: Question about ESD FT812 project porting to STM32
« Reply #4 on: December 08, 2022, 11:05:40 AM »

Hello,

I would suggest that if the port works on the display and can produce widgets on the LCD screen without the MX_SDMMC1_SD_Init(), then the port has worked correctly.

What is contained within you MX_SDMMC1_SD_Init() code? As per your previous posts including this causes the co-processor error.

Could you let me now what your hardware setup is? For example are you utilising the same SPI lines to the EVE board and the SD Card?

You can email our main support email address at: support.emea@brtchip.com

Best Regards,
BRT Community
Logged

kevin

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Question about ESD FT812 project porting to STM32
« Reply #5 on: December 13, 2022, 08:57:40 AM »

Hi ,

I found the problem , when I reconnect the wire to the device it works fine.
it should be something wrong with wiring. (like poor contact...)

Sorry I may have asked a stupid question...

thanks.
Logged