Skip to content

air001的flash模拟eeprom默认只有128字节 #92

@kuugasama

Description

@kuugasama

描述一下这个bug / Describe the bug

用eeprom.get读取只能读取128字节数据,用eeprom.put也是只能写入128字节数据,定义DATA_EEPROM_BASE和DATA_EEPROM_END也不能解决

复现步骤 / To Reproduce

#include <Arduino.h>
#include "Seeed_LDC1612.h"
#include <EEPROM.h>

LDC1612 sensor;

const int n = 60;
u32 z_mini = 0x1000000;
u32 LDC_DATA[n] = {0} ;
u32 addr = 129 ;//写入和读取位置,尝试从第129字节
u32 _pos = 0;
void setup()
{
EEPROM.get(_pos ,LDC_DATA);
EEPROM.get(addr,z_mini);
sensor.init();
Serial.begin(115200);
delay(100);
Serial.print("start! Z0 = ");
Serial.println(z_mini);//打印出来为0
for(int i = 0;i < n ;i++)//测试60个数组
{
Serial.print(LDC_DATA[i]);
Serial.print(",");
}
Serial.println(" ");
Serial.print("eeprom_length = ");
Serial.println(EEPROM.length());//eeprom长度只有128
sensor.get_channel_result(CHANNEL_1,&z_mini);
EEPROM.put(addr, z_mini);
EEPROM.get(addr,z_mini);
Serial.print("start! Z0 = ");
Serial.println(z_mini);//打印出来还是0

// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

如果正常,应该是什么样 / Expected behavior

模拟eeprom可利用空间更大

截图 / Screenshots

_T~A1V$3{@WNVEB41X OY`1

日志 / Logs

image

系统 / System

win10 22h2

PACK包版本 / Version

0.60

验证

  • 检查过该问题,之前没有人提过 / Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • 提供了最小可复现工程或详细的复现步骤,确保开发者可以复现 / The provided reproduction is a minimal reproducible example of the bug.
  • 已经提供了完整的报错信息、日志、截图,没有经过删减。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions