Writing to a Compact flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Writing to a Compact flash

Writing to a Compact flash

If anybody meets an issue with MQX 3.8 (also 3.8.1, 4.0 and 4.0.1) writing to a Compact flash (/mfs/examples/cfcard), there is an error in the cfcard io driver. Compact flash can be read, but writing doesn't work.

Fix for this is in the source file:

c:\Freescale\Freescale MQX 3.8\mqx\source\io\pcflash\apcflash.c

in function _io_apcflash_write() on line 452, change from:

results = _io_apcflash_read_write_blocks(fd_ptr, info_ptr, data_ptr, num, FALSE);

change to:

results = _io_apcflash_read_write_blocks(fd_ptr, info_ptr, data_ptr, num, TRUE);


Tested on M5329EVB and MQX 3.8.1.

%3CLINGO-SUB%20id%3D%22lingo-sub-1112314%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWriting%20to%20a%20Compact%20flash%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1112314%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIf%20anybody%20meets%20an%20issue%20with%20MQX%203.8%20(also%203.8.1%2C%204.0%20and%204.0.1)%20writing%20to%20a%20Compact%20flash%20(%2Fmfs%2Fexamples%2Fcfcard)%2C%20there%20is%20an%20error%20in%20the%20cfcard%20io%20driver.%20Compact%20flash%20can%20be%20read%2C%20but%20writing%20doesn't%20work.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EFix%20for%20this%20is%20in%20the%20source%20file%3A%3C%2FP%3E%3CP%3Ec%3A%5CFreescale%5CFreescale%20MQX%203.8%5Cmqx%5Csource%5Cio%5Cpcflash%5Capcflash.c%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Ein%20function%20_io_apcflash_write()%20on%20line%20452%2C%20change%20from%3A%20%3C%2FP%3E%3CPRE%20__default_attr%3D%22c%2B%2B%22%20__jive_macro_name%3D%22code%22%20class%3D%22jive_text_macro%20jive_macro_code%20_jivemacro_uid_13642130107884585%22%20jivemacro_uid%3D%22_13642130107884585%22%3E%0A%3CP%3Eresults%20%3D%20_io_apcflash_read_write_blocks(fd_ptr%2C%20info_ptr%2C%20data_ptr%2C%20num%2C%3CSTRONG%3E%20FALSE%3C%2FSTRONG%3E)%3B%3C%2FP%3E%0A%3C%2FPRE%3E%3CP%3E%3C%2FP%3E%3CP%3Echange%20to%3A%20%3C%2FP%3E%3CPRE%20__default_attr%3D%22c%2B%2B%22%20__jive_macro_name%3D%22code%22%20class%3D%22jive_text_macro%20jive_macro_code%20_jivemacro_uid_13642130181197725%22%20jivemacro_uid%3D%22_13642130181197725%22%3E%0A%3CP%3Eresults%20%3D%20_io_apcflash_read_write_blocks(fd_ptr%2C%20info_ptr%2C%20data_ptr%2C%20num%2C%20%3CSTRONG%3ETRUE%3C%2FSTRONG%3E)%3B%3C%2FP%3E%0A%3C%2FPRE%3E%3CP%3E%3CBR%20%2F%3ETested%20on%20M5329EVB%20and%20MQX%203.8.1.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 02:17 AM
Updated by: