cancel
Showing results for 
Search instead for 
Did you mean: 

NTFS formatted USB Pendrive detection in STM32H747 controller

JitendraD20
Associate II

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.

6 REPLIES 6

@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 ?

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Peter BENSCH
ST Employee

@JitendraD20 

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.


@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!

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Should be able to check for NTFS partitions by walking the Partition Table in sector 0, aka MBR

 

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..