none
Flash and Format NAND flash partition from user space RRS feed

  • Question

  • Hi,

    I am currently working on a developing wince application to flash the binaries in NAND flash memory. Is it possible to flash the images from user space to NAND flash memory? Or I should use custom stream driver like FMD driver and try to access through FMD driver?

    Friday, March 1, 2019 7:15 AM

Answers

  • That depends on your NAND Flash driver implementation. You can try ScanVolumeEx, but I'm pretty sure that does not call through to the bad block detection code in the NAND flash driver.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Monday, March 4, 2019 10:25 PM
    Moderator

All replies

  • It's possible from user space via DISK_IOCTLS. Which ones to use depends on the implementation, but usually it is "DISK_IOCTL_WRITE" (and _READ) or if the NAND driver has a bit more functionality, it may be called something like "IOCTL_DISK_VENDOR_WRITE_IMAGE" (and _READ_IMAGE). In short; it is implementation dependent...

    If your NAND driver does not support these IOCTLs, you'll have to implement them there yourself. The NAND driver is the obvious location in that case (no need to develop a separate driver).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Friday, March 1, 2019 8:56 AM
    Moderator
  • Thanks for the reply, Michel. One more question, if I was not able to access the partition, I wants to format them to raw partition. Is it able to format the partition as raw partition from user space?
    Friday, March 1, 2019 1:03 PM
  • Also, is it possible to scan the NAND flash for bad blocks from user space?
    Friday, March 1, 2019 1:14 PM
  • That depends on your NAND Flash driver implementation. You can try ScanVolumeEx, but I'm pretty sure that does not call through to the bad block detection code in the NAND flash driver.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Monday, March 4, 2019 10:25 PM
    Moderator