- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use Bootlotable, Booltloader.
The contents written to the EEPROM will be lost.
How do I rewrite only the flash without changing the contents of the EEPROM?
Bootlotable、 Booltloaderを 使用します。
EEPROMに書き込み内容が 消えてしまいます。
どうすれば EEPROMの内容は変えずに フラッシュのみ書き換えれるでしょうか
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Tags:
- eeprom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ご回答、有難うございます。
この設定ですと、EEPROMが"Checksum exclude section"にマッピングされていないことになります。
このセッティングにはご使用されるEEPROMのサイズ(以上)を設定しください。
また、EEPROMのBase addressを設定する必要があるのですが、
これに付きましては添付の資料を参考にしてください。
資料はPSoC4で記載されていますが、基本的FlashアーキテクチャはPSoC5LPは同様になります。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
先ずは今回のプロジェクトの構成、メモリマップ情報を共有して頂けないでしょうか?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
プロジェクトは ともに CY8C5888LTI で
(A)Booltloader を含むのと
(B)Bootlotable, を含むのと
2個で構成されていてます。
メモリマップ は 意識したことがないです。
USBBootloaderHost.exe にて書き込むと EEPROM内容がなくなってしまいます
Bootloader_Start() が 実行されると それ以前に書き込んでいた EEPROM内容がなくなってしまいます
■■■(A) main.c ■■■
int main()
{
if(P5_IN_Read() == 1){
//指定ピンが Hなら boot start
Bootloader_Start();
}
else{
Bootloader_SET_RUN_TYPE(Bootloader_SCHEDULE_BTLDB);
CySoftwareReset();
}
for (;;){}
}
■■■(B) main.c ■■■
int main(void)
{
cy_en_em_eeprom_status_t eepromReturnValue;
uint8_t i;
CyGlobalIntEnable; /* Enable global interrupts. */
USBUART_Start(0, USBUART_3V_OPERATION); //USBUARTをスタート
while(!USBUART_GetConfiguration()); //ホストとの接続待ち
USBUART_CDC_Init(); //CDCの初期化
CyDelay(100u);
eepromReturnValue = Em_EEPROM_Init((uint32_t)Em_EEPROM_em_EepromStorage);
eepromReturnValue = Em_EEPROM_Read(LOGICAL_EEPROM_START, &EEpron_buf, LOGICAL_EEPROM_SIZE);
//読込値の比較
int flg=1;
for(i = 0 ; i < sizeof(strEE); i++){
if(EEpron_buf != strEE ){
flg=0;
}
}
//判定 指定値でなければ 書き込む
if(flg != 1){
for(i = 0 ; i < sizeof(strEE); i++){
EEpron_buf = strEE ;
}
eepromReturnValue = Em_EEPROM_Write(LOGICAL_EEPROM_START, &EEpron_buf, LOGICAL_EEPROM_SIZE);
}
for(;;)
{
CyDelay(1000u);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bootloadableコンポーネントの"Checksum exclude section size"の設定がどのようになっているか教えて頂けないでしょうか?
宜しくお願い致します。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
何も変更していません。
提示いただいた画像のままです。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
お返事 ありがとうございます。
うまく 動作できそうです。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ご連絡、有難うございます。
もし動作致しましたら、ご一報ください。
宜しくお願い致します。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
atsa,
I wonder if this post might be helpful: Update fw reset some eeprom cells
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply.
I tried to ignore the first 4 bytes of the EEPROM but it didn't work.
お返事ありがとうございます。
EEPROMの最初の4バイトを無視するようにしましたが うまくいきませんでした。