2025-04-30 2:20 AM
Hii Community Member,
I have a query regarding detection of NTFS based USB pendrive detection.
I am currently working on STM32H747 in which I am trying to implement simple file operation (like read-write-modify). I had implemented middleware such as FatFs as per given example.
When I tried to detect USB pendrive which was old and exFAT formatted, then controller was able to detect same and did file operation as required. But when another pen-drive (SanDisk 3.2 Gen1 128GB) was tried to detect then it was only able to perform enumeration but not able to perform file operation.
When same pendrive formatted in exFAT and performed same activity then it was able to do file operation.
I am trying to detect NTFS based pen-drive on this microcontroller so that if user having NTFS pen-drive and trying to connect with my device then user need to able perform same. Rather than formatting to exFAT and then do so.
Kindly provide me with your valuable solutions or experience facing similar problem.
Thanks for your valuable time for helping on this.
2025-04-30 2:31 AM
@JitendraD20 wrote:I had implemented middleware such as FatFs .
What do you mean, "such as" FatFS?
If it is actually FatFS, did you check if that supports NTFS ?
2025-04-30 4:09 AM
As far as I understand, you want to read and write NTFS formatted sticks with the STM32, right?
Are you aware that exFAT and NTFS are not open source and Microsoft-patented that you need a licence from if you want to use it?
As long as you use Microsoft Windows, you can use both file systems free of charge and worry-free - because you have acquired the licence with the purchase of the Windows licence or the computer. With embedded systems, however, you have to purchase this licence separately for your project.
Regards
/Peter
2025-04-30 4:39 AM - last edited on 2025-04-30 5:52 AM by Andrew Neil
Hii @Peter BENSCH
Thanks for your prompt reply.
As far as I understand, you want to read and write NTFS formatted sticks with the STM32, right? >> Yes Right
Are you aware that exFAT and NTFS are not open source and Microsoft-patented that you need a licence from if you want to use it? >> Yes I am aware they are not open source.
With embedded systems, however, you have to purchase this license separately for your project. >> As my product is build on bare metal approach and not on based of O.S approach. So is it still require license ?
Please correct me if I am wrong at a point.
2025-04-30 4:50 AM
@JitendraD20 wrote:my product is build on bare metal approach and not on based of O.S approach. So is it still require license ?
Yes, it will.
This will be why FatFS doesn't support it!
2025-04-30 4:59 AM
As @Andrew Neil mentioned, the licence fee also applies to Bare Metal. Microsoft has not made NTFS subject to licence for an operating system, but NTFS itself, regardless of where you use it.
However, we are not Microsoft's lawyers here, with whom you would have to agree on the conditions.
Good luck!
/Peter
2025-04-30 5:40 AM - edited 2025-04-30 5:41 AM
Should be able to check for NTFS partitions by walking the Partition Table in sector 0, aka MBR