Dear all,
We are getting the following error while trying to configure the ADRV9026 in digital internal loopback (De-framer -> Framer):
Connecting Connected SPI Write Address 0x6689: 0xd5 System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt) at adrv9010_dll.SubClasses.Adrv9010Hal.SpiByteRead(UInt16 addr, Byte& readdata) at CallSite.Target(Closure , CallSite , CodeContext , Object , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Adi.Tpg.IronPythonWindow.ScriptHost.Execute(String expression)
The testing-setup is the following:
We took the script shared by PVALAVAN in the following post: Link
Incidentally, we only modified it such that the value to be written was 0xD5 (for setting up the desired configuration). The Iron Python code is the following:
################################################################################# #GUI Version: 5.0.0.76 #DLL Version: 5.0.0.57 #Cmd Server Version: 5.0.0.57 #FPGA Version: 0xD9000007 #ARM Version: 5.0.0.32(ADI_ADRV9025_ARMBUILD_TESTOBJ) #StreamVersion: 8.0.0.5 ################################################################################# #Import Reference to the DLL import System import clr import time from System import Array clr.AddReferenceToFileAndPath("C:\\Program Files\\Analog Devices\\ADRV9025 Transceiver Evaluation Software_x64_FULL\\adrvtrx_dll.dll") from adrv9010_dll import AdiEvaluationSystem from adrv9010_dll import Types from adrv9010_dll import Ad9528Types def spiRead(address): data = adrv9010.Hal.SpiByteRead(address, 0) print "SPI Read Address " + hex(address) + ": " + hex(data[1]) def spiWrite(address, data): adrv9010.Hal.SpiByteWrite(address, data) print "SPI Write Address " + hex(address) + ": " + hex(data) #Create an Instance of the Class link = AdiEvaluationSystem.Instance connect = False if (link.IsConnected() == False): connect = True link.platform.board.Client.Connect("192.168.10.10", 22) print "Connecting" if (link.IsConnected()): adrv9010 = link.Adrv9010Get(1) print "Connected" ##### YOUR CODE GOES HERE ##### #spiWrite(0x6689, 0x29) spiWrite(0x6689, 0xD5) #print spiRead(0x6689) spiRead(0x6689) else: print "Not Connected" if (connect): link.platform.board.Client.Disconnect() print "Disconnected"
It seems there is an error regarding the function adrv9010.Hal.SpiByteRead(address, 0) which we are still trying to solve.
In addition, since the spiWrite(0x6689, 0xD5) cmd. seemed to run properly, we disregarded the spiRead(0x6689) cmd. to test the loop-back, but no data (‘0’s) was observed at the FPGA’s framer. Hence, it led us to think that the loop-back was not properly configured.
It is worth noting that the ADRV9026’s initialization was completed successfully. Moreover, the JESD204B Rx & Tx links were properly brought up. The deframer 0 status was 0x87 and framer 0 status was: [status|framerSyncNeCount|qbfStateStatus|syncNSel] = [A|4|D|0].
We would appreciate any suggestion.
Iron Python code was added
[edited by: JNPH at 3:43 PM (GMT -4) on 11 Oct 2024]