-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Labels
Description
When I try to read the LEDDPWR registers from MicroPython, I don't get the expected values:
>>> import fomu
>>> rgb = fomu.rgb()
>>> ADDR_RED_LED_PULSE_WIDTH = 0b0001
>>> ADDR_GREEN_LED_PULSE_WIDTH = 0b0010
>>> ADDR_BLUE_LED_PULSE_WIDTH = 0b0011
>>> rgb.write_raw(ADDR_RED_LED_PULSE_WIDTH, 10)
>>> rgb.write_raw(ADDR_GREEN_LED_PULSE_WIDTH, 20)
>>> rgb.write_raw(ADDR_BLUE_LED_PULSE_WIDTH, 30)
>>> rgb.read_raw(ADDR_RED_LED_PULSE_WIDTH)
30
>>> rgb.read_raw(ADDR_GREEN_LED_PULSE_WIDTH)
30
>>> rgb.read_raw(ADDR_BLUE_LED_PULSE_WIDTH)
30
On closer inspection this doesn't necessarily seem to be a MicroPython issue since I also can't get this to work when using wishbone-tool (trying to read back the values written via MicroPython before):
$ wishbone-tool 0xe0006804 1
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Exited MemoryAccess thread
$ wishbone-tool 0xe0006800
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Value at e0006800: 0000001e
Exited MemoryAccess thread
$ wishbone-tool 0xe0006804 2
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Exited MemoryAccess thread
$ wishbone-tool 0xe0006800
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Value at e0006800: 0000001e
Exited MemoryAccess thread
$ wishbone-tool 0xe0006804 3
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Exited MemoryAccess thread
$ wishbone-tool 0xe0006800
INFO [wishbone_tool::bridge::usb] opened USB device device 007 on bus 001
Value at e0006800: 0000001e
Exited MemoryAccess thread
Reactions are currently unavailable