迪文科技论坛

 找回密码
 立即注册
搜索
查看: 2036|回复: 12

Data reading problem from dgus flash !DMT80600L104_01WT

[复制链接]

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
发表于 2020-3-23 17:39:48 | 显示全部楼层 |阅读模式
Hi everyone !
I am having trouble reading and writing to the flash memory of the screen.
I write data to some addresses. however, when I turn the device off and on, it reads different values ​​while reading.

The addresses and data I wrote are as follows:
address: 0x01DE 2EE4  ----> written value: 8000(decimal) = (0x1F40)
address: 0x01DE 0FA0  ----> written value: 0
address: 0x01DE 2EF2  ----> written value: 0

When I turn the device off and on, the data I read from these addresses are as follows:
address: 0x01DE 2EE4  ----> read value: 48960(decimal)  = (0xBF40)
address: 0x01DE 0FA0  ----> read value: 0x02000000
address: 0x01DE 2EF2  ----> read value: 0x32000000


where could the problem be? Could there be an error in UART when sending data to dgus flash? because I am sending a lot of writing commands one after another. does this cause an error? If so, what solution will be required?
回复

使用道具 举报

0

主题

46

回帖

810

积分

高级会员

Rank: 4

积分
810
发表于 2020-3-23 19:55:50 | 显示全部楼层
What is the LCD model you are using?DMT80600L104_01WT?
Do you use the 0X90 or 0X91 ?
回复

使用道具 举报

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
 楼主| 发表于 2020-3-23 20:17:23 | 显示全部楼层
yep. my lcd model is DMT80600L104_01WT and I use 0x90,0x91 command.
回复

使用道具 举报

0

主题

46

回帖

810

积分

高级会员

Rank: 4

积分
810
发表于 2020-3-23 21:06:30 | 显示全部楼层
cmlbay54 发表于 2020-3-23 20:17
yep. my lcd model is DMT80600L104_01WT and I use 0x90,0x91 command.

Please send me the complete instructions.
回复

使用道具 举报

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
 楼主| 发表于 2020-3-23 22:12:10 | 显示全部楼层
void dg_write_data_4(uint16_t adres,uint32_t data){
        dec_to_hex2_adres(adres);  // convert decaimal values to hex values
        dec_to_hex_4(data);           // convert decaimal values to hex values
       
        uart_putc(0xAA);  //head.
        uart_putc(0x90);
        uart_putc(0x55);
        uart_putc(0xAA);
        uart_putc(0x5A);
        uart_putc(0xA5);
       
        uart_putc(0x01);                //adres and values.
        uart_putc(0xDE);
        uart_putc(dizi_16a[0]);
        uart_putc(dizi_16a[1]);
        uart_putc(dizi_32[0]);    //values
        uart_putc(dizi_32[1]);
        uart_putc(dizi_32[2]);
        uart_putc(dizi_32[3]);
       
        uart_putc(0xCC);                        //tail.
        uart_putc(0x33);
        uart_putc(0xC3);
        uart_putc(0x3C);
}

This is my flash write function. it will be very long and complicated if I send all the codes. is that enough for you to understand?
回复

使用道具 举报

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
 楼主| 发表于 2020-3-23 22:17:55 | 显示全部楼层
I use this function to read.

void dg_read_address_4(uint16_t adres){  
        dec_to_hex2_adres(adres);
       
        uart_putc(0xAA);                //head.
        uart_putc(0x91);
        uart_putc(0x55);
        uart_putc(0xAA);
        uart_putc(0x5A);
        uart_putc(0xA5);

        uart_putc(0x01);                //adres and lenght.
        uart_putc(0xDE);
        uart_putc(dizi_16a[0]);
        uart_putc(dizi_16a[1]);
        uart_putc(0x00);
        uart_putc(0x04);                        //4 byte.
       
        uart_putc(0xCC);                        //tail.
        uart_putc(0x33);
        uart_putc(0xC3);
        uart_putc(0x3C);
}

After this command, I save the information from uart with this function:

uint32_t dg_read_receive_data_4(){
        deger_32[0] = RXBUF[7];                //okunan degerler sırası ile değer dizisine kaydedilyor. . .
        deger_32[1] = RXBUF[8];
        deger_32[2] = RXBUF[9];
        deger_32[3] = RXBUF[10];
        hex_to_dec_4();                                //A value of 4 bytes is converted to 32-bit integer.
        return dgus_okunan32;
}
回复

使用道具 举报

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
 楼主| 发表于 2020-3-24 14:17:45 | 显示全部楼层
is there anyone who can help?
If I save the data in the range 0x00000000-0x01DDFFFF, the data is deleted when the device turns off. If I save the data in the range 0x01DE0000-0x01DEFFFF, it reads the data incorrectly when reading. I wonder why?
回复

使用道具 举报

0

主题

46

回帖

810

积分

高级会员

Rank: 4

积分
810
发表于 2020-3-24 15:53:53 | 显示全部楼层
cmlbay54 发表于 2020-3-24 14:17
is there anyone who can help?
If I save the data in the range 0x00000000-0x01DDFFFF, the data is del ...

User memory range:0x0000-0x0FFFF,64KB Flash。
My test:
TX:AA 90 55 AA 5A A5 01 DE 0000 000A CC 33 C3 3C
RX:AA 90 4F 4B CC 33 C3 3C

TX:AA 91 55 AA 5A A5 01 DE 0000 0002 CC 33 C3 3C
RX:AA 91 55 AA 5A A5 01 DE 0000 0002  000A CC 33 C3 3C

Power-off and power-on tests are all correct data.



回复

使用道具 举报

0

主题

763

回帖

8629

积分

论坛元老

Rank: 8Rank: 8

积分
8629
发表于 2020-3-24 15:55:16 | 显示全部楼层
0x90 and 0x91 of T5UIC2 do not distinguish between random storage and sequential storage. The address range is 0000-FFFF. The first two bytes are fixed at 01 DE. You can see the description of the figure, modify the program and test it.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

6

主题

29

回帖

113

积分

注册会员

Rank: 2

积分
113
 楼主| 发表于 2020-3-24 19:13:22 | 显示全部楼层
本帖最后由 cmlbay54 于 2020-3-24 19:19 编辑

I'm already following your advice. but that's exactly the problem:
I saved '0' to address 0x0000 and address 0x0FA0. I change the value of 0x0000 and write 25 for example. However, the value at address 0x0FA0 changes automatically and becomes 0x19000000. whereas I did not change the value at 0x0FA0. Why does its value change itself?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|迪文科技论坛 ( 京ICP备05033781号-1 )

GMT+8, 2025-5-10 03:32 , Processed in 0.059804 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表