-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for variable-sized mailbox buffer #1
Comments
Is this still a problem in the fbuf branch version ? I'm trying to set the pwm for the POE hat. That is register 0x00030049 for the GET and 0x00030050 for the set. I'm doing the following in python:
the RPIQ_SHORT_BUFFER_LEN is set to 24 |
The fbuf branch in fact does support variable-sized buffers, since I needed them to implement the framebuffer mailbox interface. The buffer is allocated based on the number of bytes supplied in the buffer len field (as you have done): https://github.com/thebel1/thpimon/blob/fbuf/pimon_charDev.c#L447 Having said that, the mailbox interface is not for interacting with memory-mapped registers, but rather with the VideoCore GPU via a mailbox interface. The struct you're building in Python is the mailbox buffer you're sending to the VideoCore. See the following for a list of supported mailbox properties: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface . Currently, only channel 8 is supported. I hope that helps. |
I said register but essentially those are the mailbox properties but it seems the wiki doesn't mention these higher ones e.g. it ends at 0x00030020 and then goes on with 0x00040001 |
In that case, it should work. Can you paste the code around the snippet you sent earlier and the tail of the /var/log/vmkernel.log after running your script please. I'll need to have a look at the logging. |
0001-Add-test-version-of-setting-pwm-for-POE-hat.txt attached the current quick hack. The log looks like the following: 2020-12-01T12:01:36.118Z cpu3:133881)thpimon: pimon_charDevOpen:351: opened file; priv 0x4304d9001340 lock 0x4304d90013c0 e.g. that was running the pimon_setpwm.py script. So it seems that it gets send but the mailbox responds with an error. For now I soldered some wires to the 5v and GND pin and plugged the POE HAT fan onto that and then it runs and keeps |
Yeah, we're going to need some additional data here, to get the contents of the buffer before it gets sent. If dynamic VProbes were available on Arm this would be easy. Hopefully, they'll be supported soon. Can you send me the entirety of your script plus the pimon library's init.py file? I'd like to repro this on my Pi. |
I already attached the patch to my previous message which you can just apply and that will give you the extra code and the two scripts. I can also attach that again if that helps. |
init.txt The python files renamed to .txt extension instead of .py |
Currently, only a fixed-size buffer of 32 bytes is supported. This prevents acquiring the VideoCore command line or the clock list.
The text was updated successfully, but these errors were encountered: