\r
/** Sends the given pointer address to the target's TPI pointer register */\r
static void TINYNVM_SendPointerAddress(const uint16_t AbsoluteAddress)\r
\r
/** Sends the given pointer address to the target's TPI pointer register */\r
static void TINYNVM_SendPointerAddress(const uint16_t AbsoluteAddress)\r
* two bits of the 6-bit address are shifted left once */\r
XPROGTarget_SendByte(TPI_CMD_SOUT | ((Address & 0x30) << 1) | (Address & 0x0F));\r
}\r
* two bits of the 6-bit address are shifted left once */\r
XPROGTarget_SendByte(TPI_CMD_SOUT | ((Address & 0x30) << 1) | (Address & 0x0F));\r
}\r
bool TINYNVM_WaitWhileNVMBusBusy(void)\r
{\r
/* Poll the STATUS register to check to see if NVM access has been enabled */\r
bool TINYNVM_WaitWhileNVMBusBusy(void)\r
{\r
/* Poll the STATUS register to check to see if NVM access has been enabled */\r
while (TimeoutMSRemaining)\r
{\r
/* Send the SLDCS command to read the TPI STATUS register to see the NVM bus is active */\r
XPROGTarget_SendByte(TPI_CMD_SLDCS | TPI_STATUS_REG);\r
if (XPROGTarget_ReceiveByte() & TPI_STATUS_NVM)\r
return true;\r
while (TimeoutMSRemaining)\r
{\r
/* Send the SLDCS command to read the TPI STATUS register to see the NVM bus is active */\r
XPROGTarget_SendByte(TPI_CMD_SLDCS | TPI_STATUS_REG);\r
if (XPROGTarget_ReceiveByte() & TPI_STATUS_NVM)\r
return true;\r
bool TINYNVM_WaitWhileNVMControllerBusy(void)\r
{\r
/* Poll the STATUS register to check to see if NVM access has been enabled */\r
bool TINYNVM_WaitWhileNVMControllerBusy(void)\r
{\r
/* Poll the STATUS register to check to see if NVM access has been enabled */\r
while (TimeoutMSRemaining)\r
{\r
/* Send the SIN command to read the TPI STATUS register to see the NVM bus is busy */\r
while (TimeoutMSRemaining)\r
{\r
/* Send the SIN command to read the TPI STATUS register to see the NVM bus is busy */\r
- * \param[in] WriteAddress Start address to write to within the target's address space\r
- * \param[in] WriteBuffer Buffer to source data from\r
- * \param[in] WriteLength Total number of bytes to write to the device (must be an integer multiple of 2)\r
+ * \param[in] WriteAddress Start address to write to within the target's address space\r
+ * \param[in] WriteBuffer Buffer to source data from\r
+ * \param[in] WriteLength Total number of bytes to write to the device (must be an integer multiple of 2)\r
- /* Write to a location within the target address space to start the erase process */\r
- TINYNVM_SendPointerAddress(Address);\r
+ /* Write to a high byte location within the target address space to start the erase process */\r
+ TINYNVM_SendPointerAddress(Address | 0x0001);\r