Problems migration mqx3.7 to mqx4.0

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

Problems migration mqx3.7 to mqx4.0

580件の閲覧回数
feraro
Contributor IV

Hello.

I have a project created with MQX 3.7 and CW10.5  and working properly.

I'm trying to start a new project based on this, but with MQX 4.0.2
I have the following problem, when I try to erase the flash memory:

    error_code = _io_ioctl (flash_hdl, FLASH_IOCTL_ERASE_CHIP, NULL);

the program jumps to _int_kernel_isr


The complete code is:


   // Open the flash device

    flash_hdl = flash_open(FLASH_NAME);

    // Enable sector cache

   _io_ioctl(flash_hdl, FLASH_IOCTL_ENABLE_SECTOR_CACHE, NULL);

    _io_ioctl(flash_hdl, IO_IOCTL_DEVICE_IDENTIFY, &ident_arr[0]);

  

   // Get base address

   error_code = ioctl(flash_hdl, FLASH_IOCTL_GET_BASE_ADDRESS, &base_addr);

   error_code = ioctl(flash_hdl, FLASH_IOCTL_GET_BLOCK_MAP,(uint_32 _PTR_)&info_ptr);     

  

   // Erase all the flash

   error_code = _io_ioctl(flash_hdl, FLASH_IOCTL_ERASE_CHIP, NULL);

Someone can help me?.


Thank you very much.

0 件の賞賛
3 返答(返信)

384件の閲覧回数
DavidS
NXP Employee
NXP Employee

Hi Fernando,

Are you running the code from flash?  If yes you cannot erase the flash you are running out of.

Have you reviewed the MQX4.0.2\mqx\examples\flashx project?

I have not compared the MQX3.7 to MQX4.0.2.

I have verified that the MQX4/0/2\mqx\examples\flashx is working with TWR-K60N512,

Regards,

David

0 件の賞賛

384件の閲覧回数
KJFPE
Contributor III

Hi Fernando,

Which chip are you using?

0 件の賞賛

384件の閲覧回数
feraro
Contributor IV

Hi Kevin.

Is the internal flash MK60DN512 own.


Regards

0 件の賞賛