AnsweredAssumed Answered

Problems migration mqx3.7 to mqx4.0

Question asked by Fernando Ramon on Oct 22, 2013
Latest reply on Oct 22, 2013 by David E Seymour

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.

Outcomes