Main Site Documentation

F40 won't mount flash drive on U0


#1

I’m trying to use the F40 USB board with a flash drive. I’m controlling the board with an STM32 using the USART interface. I send the init media command and immediately get a command successful response. When I then send a file open command, I get a response code of 10, "Media does not initialize. The busy signal is low the entire time. I have tried several different flash drives, all give the same result. If I do a status check, it reports that U0 is detected, but it won’t mount. What am I doing wrong?


#2

@ mntnEngineer -

Show me the commands you used, please?

Did you feed the board with 5V?


#3

I am feeding the board with 5V. I was able to get the drive to mount by sending the init media command twice. Here are the messages going back and forth (I am using an STM32):
STM32=> I U0:\n
F40=> !00\n
SMT32=> I U0:\n
F40=> !00\n

I do have a couple of questions though.

Is there a maximum number of bytes that can be written with the W command?
What should the delay be between receiving a response on the number of bytes written and then closing the file?

Thanks!!!


#4

@ mntnEngineer -

How about format your media with "Q confirm format U0:"
Try to find out when it is still easy one, before it becomes harder one, I think something still not right here.

Yes, of course, but it is 32 bit large, large enough to say unlimited.

Depends on your media devices, not ALFAT.
If you are not going to use Ready Pin, I suggest we should keep polling the state by reading until ALFAT send back “!00\n”.

Also, if for W command, although 32 bit data length each time but if not use ready pin, should be only 4KB and wait for last response “!00\n”.


#5

And try with your PC first for sure.


#6

@ mntnEngineer -

Did you monitor waveform on RX and TX pin ?
I think you have to check the waveform or communication
with PC for the accuracy of the evidence.

Even if you think that the STM32 is working correctly, it is actually doing incorrect operation.
First of all, it is necessary to connect with a PC and check it.


#7

@ DraganaM -

See my post #4.

I sent commands from my PC.