I try to use K60F120M tower nand flash with ffs_wl and used the example in the MQX tree as a starting point. As far as I can see, the IO pins are set OK.
In the code below, which is part of the the shell ffs_open command, nandflash_handle gets a value but _io_mfs_install fails (internally, it hangs when it tries to install a lw_semaphore).
I use CW10.3 with MQX4.1.
Any idea why this happens and/or is there a check to see if the hardware access is OK (simple read/write from the nand...?)?
/* Open nand flash wl in normal mode */
nandflash_handle = fopen(FFS_DEVICE, NANDWL_OPEN_NORMAL);
if ( nandflash_handle == NULL )
printf("Unable to open NAND Flash device.\n");
printf("\nYou must run \"ffs_repair\" command\n");
/* Install MFS over nand_wl driver */
error_code = _io_mfs_install(nandflash_handle, filesystem_name, (_file_size)0);
if (error_code != MFS_NO_ERROR)
printf("Error initializing MFS: %s\n", MFS_Error_text((uint32_t)error_code));
return 0; //_task_block();