Problems migration mqx3.7 to mqx4.0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problems migration mqx3.7 to mqx4.0

577 次查看
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 回复数

381 次查看
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 项奖励

381 次查看
KJFPE
Contributor III

Hi Fernando,

Which chip are you using?

0 项奖励

381 次查看
feraro
Contributor IV

Hi Kevin.

Is the internal flash MK60DN512 own.


Regards

0 项奖励