OpenNuvoton / NUC980_NonOS_BSP

Non-OS BSP for NUC980 Series Microprocessor
12 stars 13 forks source link

ebi demo #1

Open syl2019-he opened 4 years ago

syl2019-he commented 4 years ago

Is there any mdk project of EBI demo bare machine?

yachen commented 4 years ago

Hi, here's application demo code. We'll push EBI driver to BSP later. Thanks. main.txt

syl2019-he commented 4 years ago

谢谢 tank you !!!  Whether there is an example of using PDMA driver to generate EBI data 

------------------ 原始邮件 ------------------ 发件人: "Yi-An Chen"<notifications@github.com>; 发送时间: 2019年11月7日(星期四) 下午4:35 收件人: "OpenNuvoton/NUC980_NonOS_BSP"<NUC980_NonOS_BSP@noreply.github.com>; 抄送: "李文"<912802598@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [OpenNuvoton/NUC980_NonOS_BSP] ebi demo (#1)

Hi, here's application demo code. We'll push EBI driver to BSP later. Thanks. main.txt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

yachen commented 4 years ago

You can refer to PDMA_BasicMode sample in BSP and set the source/destination address to EBI address space to read/write EBI space.

syl2019-he commented 4 years ago

tanks !!!,Let me test the EBI + PDMA routine

yachen commented 4 years ago

Driver's out in 09f28d7. Pls update attached main. Thanks. main.txt

syl2019-he commented 4 years ago

test main.txt

Compile report undefined error

syl2019-he commented 4 years ago

main.c(156): error: #20: identifier "SYS" is undefined SYS->GPC_MFPL |= SYS_GPC_MFPL_PC0MFP_EBI_DATA0; main.c(156): error: #20: identifier "SYS_GPC_MFPL_PC0MFP_EBI_DATA0" is undefined SYS->GPC_MFPL |= SYS_GPC_MFPL_PC0MFP_EBI_DATA0; main.c(158): error: #20: identifier "SYS_GPD_MFPH_PD12MFP_EBI_DATA1" is undefined SYS->GPD_MFPH |= SYS_GPD_MFPH_PD12MFP_EBI_DATA1 | SYS_GPD_MFPH_PD13MFP_EBI_DATA2 | main.c(158): error: #20: identifier "SYS_GPD_MFPH_PD13MFP_EBI_DATA2" is undefined SYS->GPD_MFPH |= SYS_GPD_MFPH_PD12MFP_EBI_DATA1 | SYS_GPD_MFPH_PD13MFP_EBI_DATA2 | main.c(159): error: #20: identifier "SYS_GPD_MFPH_PD14MFP_EBI_DATA3" is undefined SYS_GPD_MFPH_PD14MFP_EBI_DATA3 | SYS_GPD_MFPH_PD15MFP_EBI_DATA4; main.c(159): error: #20: identifier "SYS_GPD_MFPH_PD15MFP_EBI_DATA4" is undefined SYS_GPD_MFPH_PD14MFP_EBI_DATA3 | SYS_GPD_MFPH_PD15MFP_EBI_DATA4; main.c(161): error: #20: identifier "SYS_GPF_MFPL_PF0MFP_EBI_DATA5" is undefined SYS->GPF_MFPL |= SYS_GPF_MFPL_PF0MFP_EBI_DATA5 | SYS_GPF_MFPL_PF1MFP_EBI_DATA6 | main.c(161): error: #20: identifier "SYS_GPF_MFPL_PF1MFP_EBI_DATA6" is undefined SYS->GPF_MFPL |= SYS_GPF_MFPL_PF0MFP_EBI_DATA5 | SYS_GPF_MFPL_PF1MFP_EBI_DATA6 | main.c(162): error: #20: identifier "SYS_GPF_MFPL_PF2MFP_EBI_DATA7" is undefined SYS_GPF_MFPL_PF2MFP_EBI_DATA7 | SYS_GPF_MFPL_PF3MFP_EBI_DATA8 | main.c(162): error: #20: identifier "SYS_GPF_MFPL_PF3MFP_EBI_DATA8" is undefined SYS_GPF_MFPL_PF2MFP_EBI_DATA7 | SYS_GPF_MFPL_PF3MFP_EBI_DATA8 | main.c(163): error: #20: identifier "SYS_GPF_MFPL_PF4MFP_EBI_DATA9" is undefined SYS_GPF_MFPL_PF4MFP_EBI_DATA9 | SYS_GPF_MFPL_PF5MFP_EBI_DATA10 | main.c(163): error: #20: identifier "SYS_GPF_MFPL_PF5MFP_EBI_DATA10" is undefined SYS_GPF_MFPL_PF4MFP_EBI_DATA9 | SYS_GPF_MFPL_PF5MFP_EBI_DATA10 | main.c(164): error: #20: identifier "SYS_GPF_MFPL_PF6MFP_EBI_DATA11" is undefined SYS_GPF_MFPL_PF6MFP_EBI_DATA11 | SYS_GPF_MFPL_PF7MFP_EBI_DATA12; main.c(164): error: #20: identifier "SYS_GPF_MFPL_PF7MFP_EBI_DATA12" is undefined SYS_GPF_MFPL_PF6MFP_EBI_DATA11 | SYS_GPF_MFPL_PF7MFP_EBI_DATA12; main.c(166): error: #20: identifier "SYS_GPF_MFPH_PF8MFP_EBI_DATA13" is undefined SYS->GPF_MFPH |= SYS_GPF_MFPH_PF8MFP_EBI_DATA13 | SYS_GPF_MFPH_PF9MFP_EBI_DATA14 | SYS_GPF_MFPH_PF10MFP_EBI_DATA15; main.c(166): error: #20: identifier "SYS_GPF_MFPH_PF9MFP_EBI_DATA14" is undefined SYS->GPF_MFPH |= SYS_GPF_MFPH_PF8MFP_EBI_DATA13 | SYS_GPF_MFPH_PF9MFP_EBI_DATA14 | SYS_GPF_MFPH_PF10MFP_EBI_DATA15; main.c(166): error: #20: identifier "SYS_GPF_MFPH_PF10MFP_EBI_DATA15" is undefined SYS->GPF_MFPH |= SYS_GPF_MFPH_PF8MFP_EBI_DATA13 | SYS_GPF_MFPH_PF9MFP_EBI_DATA14 | SYS_GPF_MFPH_PF10MFP_EBI_DATA15; main.c(169): error: #20: identifier "SYS_GPG_MFPL_PG0MFP_EBI_ADDR0" is undefined SYS->GPG_MFPL |= SYS_GPG_MFPL_PG0MFP_EBI_ADDR0 | SYS_GPG_MFPL_PG1MFP_EBI_ADDR1 | main.c(169): error: #20: identifier "SYS_GPG_MFPL_PG1MFP_EBI_ADDR1" is undefined SYS->GPG_MFPL |= SYS_GPG_MFPL_PG0MFP_EBI_ADDR0 | SYS_GPG_MFPL_PG1MFP_EBI_ADDR1 | main.c(170): error: #20: identifier "SYS_GPG_MFPL_PG2MFP_EBI_ADDR2" is undefined SYS_GPG_MFPL_PG2MFP_EBI_ADDR2 | SYS_GPG_MFPL_PG3MFP_EBI_ADDR3 | main.c(170): error: #20: identifier "SYS_GPG_MFPL_PG3MFP_EBI_ADDR3" is undefined SYS_GPG_MFPL_PG2MFP_EBI_ADDR2 | SYS_GPG_MFPL_PG3MFP_EBI_ADDR3 | main.c(171): error: #20: identifier "SYS_GPG_MFPL_PG6MFP_EBI_ADDR4" is undefined SYS_GPG_MFPL_PG6MFP_EBI_ADDR4 | SYS_GPG_MFPL_PG7MFP_EBI_ADDR5; main.c(171): error: #20: identifier "SYS_GPG_MFPL_PG7MFP_EBI_ADDR5" is undefined SYS_GPG_MFPL_PG6MFP_EBI_ADDR4 | SYS_GPG_MFPL_PG7MFP_EBI_ADDR5; main.c(173): error: #20: identifier "SYS_GPG_MFPH_PG8MFP_EBI_ADDR6" is undefined SYS->GPG_MFPH |= SYS_GPG_MFPH_PG8MFP_EBI_ADDR6 | SYS_GPG_MFPH_PG9MFP_EBI_ADDR7; main.c(173): error: #20: identifier "SYS_GPG_MFPH_PG9MFP_EBI_ADDR7" is undefined SYS->GPG_MFPH |= SYS_GPG_MFPH_PG8MFP_EBI_ADDR6 | SYS_GPG_MFPH_PG9MFP_EBI_ADDR7; main.c(174): error: #20: identifier "SYS_GPA_MFPH_PA12MFP_EBI_ADDR8" is undefined SYS->GPA_MFPH |= SYS_GPA_MFPH_PA12MFP_EBI_ADDR8 | SYS_GPA_MFPH_PA11MFP_EBI_ADDR9 | main.c(174): error: #20: identifier "SYS_GPA_MFPH_PA11MFP_EBI_ADDR9" is undefined SYS->GPA_MFPH |= SYS_GPA_MFPH_PA12MFP_EBI_ADDR8 | SYS_GPA_MFPH_PA11MFP_EBI_ADDR9 | main.c(175): error: #20: identifier "SYS_GPA_MFPH_PA10MFP_EBI_ADDR10" is undefined SYS_GPA_MFPH_PA10MFP_EBI_ADDR10; main.c(177): error: #20: identifier "SYS_GPB_MFPH_PB8MFP_EBI_ADDR11" is undefined SYS->GPB_MFPH |= SYS_GPB_MFPH_PB8MFP_EBI_ADDR11; main.c(178): error: #20: identifier "SYS_GPB_MFPL_PB0MFP_EBI_ADDR12" is undefined SYS->GPB_MFPL |= SYS_GPB_MFPL_PB0MFP_EBI_ADDR12;

yachen commented 4 years ago

Did you pull 09f28d7?

syl2019-he commented 4 years ago

Thank you for seeing that the EBI example has to be 32-bit access 16bits doesn't seem to respond when writing data

syl2019-he commented 4 years ago

What does ebi1 write data16 look like

syl2019-he commented 4 years ago

Tanks I tested successfully

syl2019-he commented 4 years ago

Examples of ucosiii and keil5 rtx-v2

syl2019-he commented 4 years ago

Which chip does keil 5 project choose to develop the ARM9 chip of Toshiba chosen by your example

yachen commented 4 years ago

We don't support ucosiii and keil5 rtx-v2. You can use Toshiba TMPA900CMXBG or any other ARM926EJ-S processor.

syl2019-he commented 4 years ago

tank you!!!

syl2019-he commented 4 years ago

How to set up EBI to support LCD 80 mode? Is there a test example

syl2019-he commented 4 years ago

EBI and PDMA fail to pass the test. I don't know what causes the failure of data transmission of PDMA

syl2019-he commented 4 years ago

EBI uses PDMA to drive clock waveform. There are several subtle delay clocks that are not continuously output. How to optimize clock continuity

syl2019-he commented 4 years ago

微信图片_20191111105220 微信图片_20191111105230

syl2019-he commented 4 years ago

PDMA + EBI intermediate interval time is a little long. Can we find out whether the time can be reduced optimally

yachen commented 4 years ago

Hi, Please try again with max burst size (128 transfer).

syl2019-he commented 4 years ago

I've set the burst mode of the PDMA to 128 bytes, but there's still so much time between no effects

syl2019-he commented 4 years ago

pdma设置.txt

syl2019-he commented 4 years ago

Let me see if the PDMA settings are correct

yachen commented 4 years ago

Hi, you set transfer count to 1. Please set this value as large as possible. (Max is 65536). PDMA_SetTransferCnt(SRAM_MDMAx_STREAM,SRAM_MDMAx_CHANNEL, pdma_struct.pdma_width, 1);

syl2019-he commented 4 years ago

PDMA_SetTransferCnt(SRAM_MDMAx_STREAM,SRAM_MDMAx_CHANNEL, pdma_struct.pdma_width, 1);      There's no data in the beginning  

------------------ 原始邮件 ------------------ 发件人: "Yi-An Chen"<notifications@github.com>; 发送时间: 2019年11月12日(星期二) 中午1:29 收件人: "OpenNuvoton/NUC980_NonOS_BSP"<NUC980_NonOS_BSP@noreply.github.com>; 抄送: "李文"<912802598@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [OpenNuvoton/NUC980_NonOS_BSP] ebi demo (#1)

Hi, you set transfer count to 1. Please set this value as large as possible. (Max is 65536). PDMA_SetTransferCnt(SRAM_MDMAx_STREAM,SRAM_MDMAx_CHANNEL, pdma_struct.pdma_width, 1);

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

syl2019-he commented 4 years ago

  Setting it to 1 is just the beginning of initialization

------------------ 原始邮件 ------------------ 发件人: "Yi-An Chen"<notifications@github.com>; 发送时间: 2019年11月12日(星期二) 中午1:29 收件人: "OpenNuvoton/NUC980_NonOS_BSP"<NUC980_NonOS_BSP@noreply.github.com>; 抄送: "李文"<912802598@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [OpenNuvoton/NUC980_NonOS_BSP] ebi demo (#1)

Hi, you set transfer count to 1. Please set this value as large as possible. (Max is 65536). PDMA_SetTransferCnt(SRAM_MDMAx_STREAM,SRAM_MDMAx_CHANNEL, pdma_struct.pdma_width, 1);

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

syl2019-he commented 4 years ago

I don't seem to have any improvement when I modify the PDMA parameters

yachen commented 4 years ago

Hi,

In a Non-OS environment, CPU can get better EBI throughput than PDMA. To maximize the EBI + PDMA throughput, please use scatter gather mode and set max transfer count.

Sincerely,

Yi-An Chen

syl2019-he commented 4 years ago

I am using the FreeRTOS operating system project to do the development

syl2019-he commented 4 years ago

You can test how my EBI + PDM Project generated data comes from a few microseconds in the middle. The data of my PDM Project is 512 bytes

syl2019-he commented 4 years ago

You can test how my EBI + PDM Project generates data with a few microseconds in between. Actually, my data with a PDM is 512 bytes with a few microseconds in between every 16 clocks

mrajeshanalogics commented 1 year ago

HELLO, CAN YOU PLEASE SHARE THE SAMPLE PROGRAM FOR 16 BIT EBI FOR NUC980DK NON-OS bsp. @yachen @syl2019-he

ychuang3 commented 1 year ago

We re-added the EBI_SRAM sample code. Please pull the up-to-date bsp.

syl2019-he commented 1 year ago

Does EBI+SRAM support pdma for accelerating read speed and improving read and write speed of SRAM