**** BEGIN LOGGING AT Sun Nov 20 02:59:57 2022 Nov 20 03:45:39 zmatt in your py-uio module, how is the write() and read() function meant to work? I am trying to write to memory with core.write(100, 0x10000) for example, but when I do a core.core.read(c_uint32, 0x10000), I always get 0 Nov 20 03:45:51 core.read(c_uint32, 0x10000)* Nov 20 03:47:56 hmm I should probably add an explicit check to write() that raises a TypeError if you try to stick an int into it Nov 20 03:48:21 since write() converts the data to a bytes object, and bytes(100) is just 100 zero-bytes Nov 20 03:48:21 what is meant to be written into it? Nov 20 03:49:16 bytes or anything convertible to bytes, e.g. a ctypes object... in this case you probably meant to do core.write(c_uint32(100), 0x10000) Nov 20 03:49:34 if you intended to write a 32-bit unsigned integer to that location Nov 20 03:50:05 ah, yes ok. Nov 20 03:50:14 I'll be honest I rarely use read()/write(), map() is more appropriate for shared variables Nov 20 03:50:27 how do you write on the mapped variable in that case? Nov 20 03:52:04 same as you'd use ctypes objects in any other context... for integer types such as c_uint32 the object has a value attribute that you can get/set to read/write the memory Nov 20 03:52:48 nick12310: see lines 24-27 of https://pastebin.com/WM0aU8M8 Nov 20 03:54:31 I tried doing foo.value = c_uint32(100), I get a TypeError: an integer is required (got type c_ulong), if I do foo.value = 100, it is 0. Nov 20 03:54:53 ehh you're now mixing and matching things in a weird way Nov 20 03:55:35 wait I don't understand what you mean Nov 20 03:56:30 https://pastebin.com/HsYz3cut Nov 20 03:56:34 it works fine for me Nov 20 03:57:14 it's also exactly what elf-test.py does Nov 20 03:57:53 (except it doesn't write it, it just reads the value written by the C program) Nov 20 04:00:40 If I make a new variable separate, it does work. Nov 20 04:01:09 ? Nov 20 04:01:48 I think maybe it's because I initially write to the address with my pru, are you not allowed to write to the same addresses between the two? Nov 20 04:03:25 you're allowed to do whatever you want, but obviously if you're going to write to a variable from both pru and python you're going to have to think about how exactly that's going to work out in a sensible way Nov 20 04:04:36 it pretty much just behaves like two threads sharing memory Nov 20 04:07:15 I can't really comment on what you did wrong without knowing exactly what you were doing Nov 20 04:08:34 Yea, I think I'm just mixing up the writing between the two, will attempt to fix Nov 21 01:21:54 @zmatt: Hello, would using your files w/ permission be okay when posting a Merge Request for the docs. pages? Nov 21 01:22:30 I am asking b/c my relaycape on github has some of your ideas and source. Nov 21 01:25:36 For instance, I could show @zmatt did this idea or give attention to your docs. on github from the repo? Please let me know what you think when you have time. Nov 21 01:31:57 I am using the RelayCape for now. So, this is a start for me! Nov 21 02:40:05 what is a red file in /dev/gpio/? Nov 21 02:40:25 I am on the BBBW and I have a red file that in output states it is not a file. Nov 21 02:40:30 It is a file. I know it. Nov 21 02:58:29 Is there an official beagleboard.org .dts file for the RelayCape? **** ENDING LOGGING AT Mon Nov 21 02:59:57 2022