Failed to erase flash on the second time in KE02Z32

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

Failed to erase flash on the second time in KE02Z32

2,084件の閲覧回数
jimmyli
Contributor IV

Hi,

     We designed a bootloader for KE02 to update application, but that has a problem we can't fix it, hope you can help us.

     1>MCU: MKE02Z32VLC4

     2>SDK: SDK_2_13_0_MKE02Z32xxx4\boards\frdmke02z40m\driver_examples\flash\pflash

              need to modify: a. CPU clock is 32MHz provided by internal crystal.

                                       b. modify the scf file to match the real requirement.

                                       c. modify the beggining of erase address to 0x800.

              notes: a.attachment is the test source and .scf file.    

                         b.flash will not to be protected (default setting).             

     3>Test: a> download and debug the code, it will stop at :

             result = FLASH_Erase(&s_flashDriver, destAdrss, pflashSectorSize, kFLASH_ApiEraseKey);

         b>Trace the code, we find it will return a wrong at :

             returnCode = flash_command_sequence(config);    --in the FLASH_Erase api.

         c>then, we can't erase seccefully and program the internal flash.

         d>modify FPROT register to 0x24 and return, seccessful.

             modify FPROT register to 0xbf or other value, it will return 0x00, we don't know why.

      Hope that you can help us to analyse it.

      Thanks very much.

ラベル(1)
タグ(1)
0 件の賞賛
返信
2 返答(返信)

2,005件の閲覧回数
jimmyli
Contributor IV

Hi,

      Thanks for the informations that will be helpful to me.

タグ(1)
0 件の賞賛
返信