Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to connect with MX_FATFS_Init on STM32F107?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Guys,

I have a question on connecting FATFs with my low level driver on STM32CubeMx ?

Thanks
 

Is it a secret question to be asked in public forum?
 

I got FR_OK on f_mount but

f_open(&MyFile, "test.txt", FA_READ); I got FR_INVALID_OBJECT

What do I miss here ?

- - - Updated - - -

Code :
Code:
UINT bw,size;
	FRESULT fr;    /* FatFs return code */
	char line[82]; /* Line buffer */
	uint32_t wbytes; /* File write counts */
  uint8_t wtext[] = "text to write logical disk"; /* File write buffer */
  
f_mount(&mynewdiskFatFs, (TCHAR const*)mynewdiskPath, 0);
		/* Open a text file */
		
	   f_open(&MyFile, "STM32.TXT", FA_CREATE_ALWAYS | FA_WRITE);
	   f_write(&MyFile, wtext, sizeof(wtext), (void *)&wbytes);
	   f_close(&MyFile);
 

where is MyFile created in your code?
 

where is MyFile created in your code?

I put on main()...

Disk_initalize is ok, but I can not see anything in my logic analyzer...why is it ??

- - - Updated - - -

you can see the complete code if you want...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top