-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
air001的flash模拟eeprom默认只有128字节 #92
Comments
定义 |
@kuugasama 这个是用001片内的Flash当做eeprom直接读写的吗?还需要额外的芯片吗? |
用flash读写模拟eeprom |
128字节实在是太小了,不够用,能否改成和STM32一样的2048字节?或者提供一个接口、方法供我们这些小白修改EEPROM的大小? |
接口有的,就是在编译的时候通过编译选项注入这两个宏。 |
额,我比较小白,不会用啊。能否出个例程? |
描述一下这个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
日志 / Logs
系统 / System
win10 22h2
PACK包版本 / Version
0.60
验证
The text was updated successfully, but these errors were encountered: