1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>CARD_WriteFlashSector</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">CARD_WriteFlashSector <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1> 15<H2>Syntax</H2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/card.h></CODE><BR> 20 <BR> 21 <CODE>BOOL CARD_WriteFlashSector(u32 dst, const void *src, u32 len);</CODE><br> 22 <br> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1" width="100%"> 27 <TBODY> 28 <TR> 29 <TD width="13%"><EM><STRONG>dst</STRONG></EM></TD> 30 <TD width="87%">The flash memory address of the transfer destination.<br /> 31 <font color="#800000">This must be an integer multiple of the value obtained by the <A href="../common/CARD_GetBackupSectorSize.html"><CODE>CARD_GetBackupSectorSize</CODE></A> function.<br /> 32 For more about the sector size for each device, see <a href="../overview/about_Backup.html">Overview</a>.</font></TD> 33 </TR> 34 <TR> 35 <TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 36 <TD width="87%">Transfer source memory address.</TD> 37 </TR> 38 <TR> 39 <TD width="13%"><EM><STRONG>len</STRONG></EM></TD> 40 <TD width="87%">Byte length of the data to be written.<br /> 41 <font color="#800000">This must be an integer multiple of the value obtained by the <A href="../common/CARD_GetBackupSectorSize.html"><CODE>CARD_GetBackupSectorSize</CODE></A> function.<br /> 42 For more about the sector size for each device, see <a href="../overview/about_Backup.html">Overview</a>.</font></TD> 43 </TR> 44 </TBODY> 45</TABLE> 46 47<h2>Return Values</h2> 48<p>TRUE if the process succeeds. FALSE otherwise.</p> 49 50<H2>Description</H2> 51<P>Writes data to a FLASH device at the sector level.<BR>The function does not return control until it has finished processing. It returns TRUE if the process was successful or FALSE if it failed. To get the detailed result value when processing fails, call the <A href="../common/CARD_GetResultCode.html"><CODE>CARD_GetResultCode</CODE></A> function. 52</p> 53<p> 54This function simply calls a combination of the <A href="CARD_EraseFlashSector.html"><CODE>CARD_EraseFlashSector</CODE></A> and <A href="CARD_ProgramFlash.html"><CODE>CARD_ProgramFlash</CODE></A> functions internally. For more information, see the function references for these functions. 55</p> 56<p> 57To use this function, you must first lock the access bus with the <A href="../backup/CARD_LockBackup.html"><CODE>CARD_LockBackup</CODE></A> function. 58</p> 59<p> 60<font color="#800000">This function communicates with the ARM7 processor internally via PXI.<br> The process will not end if PXI interrupts are not enabled.</font> 61</P> 62<h2>See Also</h2> 63<p><CODE><A href="../common/CARD_GetResultCode.html">CARD_GetResultCode</A>, <A href="CARD_IsBackupFlash.html">CARD_IsBackupFlash</A>, <A href="CARD_ProgramFlash.html">CARD_ProgramFlash</A>, <A href="CARD_ProgramFlashAsync.html">CARD_ProgramFlashAsync</A>, <A href="CARD_ProgramAndVerifyFlash.html">CARD_ProgramAndVerifyFlash</A>, <A href="CARD_ProgramAndVerifyFlashAsync.html">CARD_ProgramAndVerifyFlashAsync</A>, <A href="CARD_EraseFlashSector.html">CARD_EraseFlashSector</A>, <A href="CARD_EraseFlashSectorAsync.html">CARD_EraseFlashSectorAsync</A>, <A href="CARD_WriteFlashSector.html">CARD_WriteFlashSector</A>, <A href="CARD_WriteFlashSectorAsync.html">CARD_WriteFlashSectorAsync</A>, <A href="CARD_WriteAndVerifyFlashSector.html">CARD_WriteAndVerifyFlashSector</A>, <A href="CARD_WriteAndVerifyFlashSectorAsync.html">CARD_WriteAndVerifyFlashSectorAsync</A>, <A href="CARD_ReadFlash.html">CARD_ReadFlash</A>, <A href="CARD_WriteFlash.html">CARD_WriteFlash</A>, <A href="CARD_VerifyFlash.html">CARD_VerifyFlash</A></CODE></p> 64 65<H2>Revision History</H2> 66<P> 672007/08/22 Initial version. 68</P> 69<hr><p>CONFIDENTIAL</p></body> 70</html> 71