Hi friends.
I built some simple i2c protocol driver code to work with Xilinx.
When I debug the code, something strange happens - the code run back and forth between 2 lines and never continue (And in debug it's always go sequentially).
*
* @brief Performs an input operation for a memory location by
* reading from the specified address and returning the 32 bit Value
* read from that address.
*
* @param Addr: contains the address to perform the input operation
*
* @return The 32 bit Value read from the specified input address.
*
******************************************************************************/
static INLINE u32 Xil_In32(UINTPTR Addr)
{
return *(volatile u32 *) Addr;
}
I guess it is something to so with this function, but I can't figure out what.
The same would be true for any other function which reads external hardware, and that hardware is capable of changing state without the program doing anything.