Hello,
I want to connect a sensor to one of the GPIO registers provided with EFM03 within EFM03 wrapper design.
To see if the apk has any effect, I tried to use the writeRegister call provided. However, when I write anything on the register and try to read it afterwards, the api always responds with a 0.
I am not sure what was wrong with the call that I made in python so below is a snippet of the program that I used:
# initialize api
udk3api.init()
# get EFM03 device
for ed in udk3api.enumerate(udk3api.ALL):
d = ed.open()
if d.getDeviceInfo().getDeviceType() == udk3api.EFM03
break
# write register
d.writeRegister(0x80000000, 0xdeadbeef)
# read registerd
val = d.readRegister(0x80000000)
# close the device
d.close()
udk3api.deInit()
This program shall be able to write to GPIO_tri_io_0 from what I understand. But when I check it on board or by reading as above there is no change.
However I also observe that for EFM03 no code example for Register R/W is provided.
So my question is is it possible to read/write registers from apk?
Am I doing something wrong?
Yours
I want to connect a sensor to one of the GPIO registers provided with EFM03 within EFM03 wrapper design.
To see if the apk has any effect, I tried to use the writeRegister call provided. However, when I write anything on the register and try to read it afterwards, the api always responds with a 0.
I am not sure what was wrong with the call that I made in python so below is a snippet of the program that I used:
# initialize api
udk3api.init()
# get EFM03 device
for ed in udk3api.enumerate(udk3api.ALL):
d = ed.open()
if d.getDeviceInfo().getDeviceType() == udk3api.EFM03
break
# write register
d.writeRegister(0x80000000, 0xdeadbeef)
# read registerd
val = d.readRegister(0x80000000)
# close the device
d.close()
udk3api.deInit()
This program shall be able to write to GPIO_tri_io_0 from what I understand. But when I check it on board or by reading as above there is no change.
However I also observe that for EFM03 no code example for Register R/W is provided.
So my question is is it possible to read/write registers from apk?
Am I doing something wrong?
Yours