K66 - Problems programming flash.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K66 - Problems programming flash.

ソリューションへジャンプ
1,294件の閲覧回数
calvinday
Contributor III

We have written a bootloader that occupies the 0x000000 - 0x0FFFFF in flash memory and a application that occupies 0x100000 - 0x1FFFFF.

When the bootloader runs, it checks to see if the application is in flash. If not, it will copy the application from external eMMC and flash it. The unit then reboots and the bootloader launches the new application.

Everything is working as expected however, when we moved the application to location 0x06000 - 0x1FFFFF, the flash erase function no longer works while trying to erase the first sector. While debugging, the MCU appears to restart.

We are using KDS 2.0.

What could be wrong?

0 件の賞賛
返信
1 解決策
1,141件の閲覧回数
ndavies
Contributor V

Did you disable all interrupts or move the active interrupts executable and remap the vectors to RAM? Interrupts must not jump to a flash bank code when you're trying to flash it.

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,141件の閲覧回数
calvinday
Contributor III

I thought we had to provide copy functions to ram functions but it is done automatically using

FLASH_DRIVER_IS_FLASH_RESIDENT.

0 件の賞賛
返信
1,141件の閲覧回数
calvinday
Contributor III

We realized that the code must be run out of ram so we added some relocated flash functions to ram.

0 件の賞賛
返信
1,142件の閲覧回数
ndavies
Contributor V

Did you disable all interrupts or move the active interrupts executable and remap the vectors to RAM? Interrupts must not jump to a flash bank code when you're trying to flash it.

0 件の賞賛
返信
1,141件の閲覧回数
calvinday
Contributor III

The MCU is resetting and the RCM_SRS1 register reports a LOCKUP event.

0 件の賞賛
返信